/** * @see org.apache.jetspeed.security.RoleManager#removeRoleFromGroup(java.lang.String, * java.lang.String) */ public void removeRoleFromGroup(String roleName, String groupName) throws SecurityException { checkInitialized(); Group group = groupManager.getGroup(groupName); if (group == null) { throw new SecurityException(SecurityException.PRINCIPAL_DOES_NOT_EXIST.createScoped(JetspeedPrincipalType.GROUP, groupName)); } Role role = getRole(roleName); if (role == null) { throw new SecurityException(SecurityException.PRINCIPAL_DOES_NOT_EXIST.createScoped(JetspeedPrincipalType.ROLE, roleName)); } super.removeAssociation(group, role, JetspeedPrincipalAssociationType.IS_MEMBER_OF); }
/** * @see org.apache.jetspeed.security.RoleManager#addRoleToGroup(java.lang.String, * java.lang.String) */ public void addRoleToGroup(String roleName, String groupName) throws SecurityException { checkInitialized(); Group group = groupManager.getGroup(groupName); if (group == null) { throw new SecurityException(SecurityException.PRINCIPAL_DOES_NOT_EXIST.createScoped(JetspeedPrincipalType.GROUP, groupName)); } Role role = getRole(roleName); if (role == null) { throw new SecurityException(SecurityException.PRINCIPAL_DOES_NOT_EXIST.createScoped(JetspeedPrincipalType.ROLE, roleName)); } super.addAssociation(group, role, JetspeedPrincipalAssociationType.IS_MEMBER_OF); }
Group group = groupManager.getGroup(name); refs.getPrincipalMap(JetspeedPrincipalType.GROUP).put(name, group);
principal = groupManager.getGroup(pName);