// check user rights:
boolean iAmOlatAdmin = ureq.getUserSession().getRoles().isOLATAdmin();
identity = ureq.getIdentity();
Manager secMgr = ManagerFactory.getManager();
// get user system roles groups from security manager
SecurityGroup adminGroup = secMgr.findSecurityGroupByName(Constants.GROUP_ADMIN);
boolean isAdmin = secMgr.isIdentityInSecurityGroup(identity, adminGroup);
SecurityGroup userManagerGroup = secMgr.findSecurityGroupByName(Constants.GROUP_USERMANAGERS);
boolean isUserManager = secMgr.isIdentityInSecurityGroup(identity, userManagerGroup);
SecurityGroup authorGroup = secMgr.findSecurityGroupByName(Constants.GROUP_AUTHORS);
boolean isAuthor = secMgr.isIdentityInSecurityGroup(identity, authorGroup);
SecurityGroup groupmanagerGroup = secMgr.findSecurityGroupByName(Constants.GROUP_GROUPMANAGERS);
boolean isGroupManager = secMgr.isIdentityInSecurityGroup(identity, groupmanagerGroup);
// usermanager:
if (isAdmin || isUserManager || iAmOlatAdmin) {
chkUserManager = uifactory.addCheckboxesVertical("Usermanager", "table.role.useradmin", innerFormLayout, new String[] { "Usermanager" }, new String[] { "" }, null, 1);