@Override public void removeAdministrators(Context context, Community community) throws SQLException, AuthorizeException { // Check authorisation - Must be an Admin of the parent community (or system admin) to delete Admin group AuthorizeUtil.authorizeRemoveAdminGroup(context, community); // just return if there is no administrative group. if (community.getAdministrators() == null) { return; } // Remove the link to the community table. community.setAdmins(null); }
if (community.getAdministrators() != null) { list.add(community.getAdministrators());
if (ROLE_ADMIN.equals(roleName)) role = community.getAdministrators(); if (role == null)
Group g = community.getAdministrators(); community.removeAdministrators(); community.update(); Group g = community.getAdministrators(); response.sendRedirect(response.encodeRedirectURL(request .getContextPath()
Group g = community.getAdministrators();
@Override public Group createAdministrators(Context context, Community community) throws SQLException, AuthorizeException { // Check authorisation - Must be an Admin to create more Admins AuthorizeUtil.authorizeManageAdminGroup(context, community); Group admins = community.getAdministrators(); if (admins == null) { //turn off authorization so that Community Admins can create Sub-Community Admins context.turnOffAuthorisationSystem(); admins = groupService.create(context); context.restoreAuthSystemState(); groupService.setName(admins, "COMMUNITY_" + community.getID() + "_ADMIN"); groupService.update(context, admins); } authorizeService.addPolicy(context, community, Constants.ADMIN, admins); // register this as the admin group community.setAdmins(admins); return admins; }
if (group.equals(community.getAdministrators())) { return GROUP_TYPE_ADMIN;
Group admins = thisCommunity.getAdministrators();