Merge V1.3 to HEAD (3045:3063)

svn merge svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3045 svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3063 .


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3340 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-07-18 15:22:09 +00:00
parent b56cc82043
commit 1147bcf949
25 changed files with 185 additions and 125 deletions

View File

@@ -289,14 +289,9 @@ public class UsersBean implements IContextListener
*/
public String deleteOK()
{
UserTransaction tx = null;
FacesContext context = FacesContext.getCurrentInstance();
try
{
FacesContext context = FacesContext.getCurrentInstance();
tx = Repository.getUserTransaction(context);
tx.begin();
String userName = (String)getPerson().getProperties().get("userName");
// we only delete the user auth if Alfresco is managing the authentication
@@ -310,25 +305,21 @@ public class UsersBean implements IContextListener
}
catch (AuthenticationException authErr)
{
Utils.addErrorMessage(Application.getMessage(FacesContext.getCurrentInstance(), ERROR_USER_DELETE));
Utils.addErrorMessage(Application.getMessage(context, ERROR_USER_DELETE));
}
}
// delete the associated Person
this.personService.deletePerson(userName);
// commit the transaction
tx.commit();
// re-do the search to refresh the list
search();
}
catch (Throwable e)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(FacesContext
.getCurrentInstance(), ERROR_DELETE), e.getMessage()), e);
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(context,
ERROR_DELETE), e.getMessage()), e);
}
return DIALOG_CLOSE;