diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/users/UserCRUDController.java b/libreplan-webapp/src/main/java/org/libreplan/web/users/UserCRUDController.java index 5db1b241f..3c442a0e6 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/users/UserCRUDController.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/users/UserCRUDController.java @@ -65,6 +65,7 @@ import org.zkoss.zul.api.Groupbox; * * @author Jacobo Aragunde Perez * @author Manuel Rego Casasnovas + * @author Javier Moran Rua */ @SuppressWarnings("serial") public class UserCRUDController extends BaseCRUDController implements @@ -184,6 +185,7 @@ public class UserCRUDController extends BaseCRUDController implements return userModel.getUsers(); } + @Override protected void save() throws ValidationException { userModel.confirmSave(); PasswordUtil.showOrHideDefaultPasswordWarnings(); @@ -352,7 +354,7 @@ public class UserCRUDController extends BaseCRUDController implements removeRole(role); } }); - removeButton.setDisabled(getLdapUserRolesLdapConfiguration() + removeButton.setDisabled(areRolesAndProfilesDisabled() || role.equals(UserRole.ROLE_BOUND_USER) || isUserDefaultAdmin()); row.appendChild(removeButton); @@ -452,7 +454,8 @@ public class UserCRUDController extends BaseCRUDController implements } public boolean areRolesAndProfilesDisabled() { - return isLdapUserLdapConfiguration() || isUserDefaultAdmin(); + return (isLdapUser() && userModel.isLDAPBeingUsed() && userModel + .isLDAPRolesBeingUsed()) || isUserDefaultAdmin(); } public boolean isLdapUserOrDefaultAdmin() { diff --git a/libreplan-webapp/src/main/webapp/users/_editUser.zul b/libreplan-webapp/src/main/webapp/users/_editUser.zul index 2f12f278d..849a61148 100644 --- a/libreplan-webapp/src/main/webapp/users/_editUser.zul +++ b/libreplan-webapp/src/main/webapp/users/_editUser.zul @@ -32,11 +32,11 @@ - - + + @@ -125,7 +125,7 @@ - @@ -146,7 +146,7 @@ -