public static boolean isAdmin ( IGroupMember member ) { IEntityGroup adminGroup = null ; try { adminGroup = GroupService . getDistinguishedGroup ( PORTAL_ADMINISTRATORS_DISTINGUISHED_GROUP ) ; } catch ( GroupsException ge ) { // cannot determine whether or not the user is an admin. cLog . error ( "Administrative group not found, cannot determine " + "user's admininstrative membership." , ge ) ; } return ( null != adminGroup && adminGroup . deepContains ( member ) ) ; }
Determines if the passed - in group member represents a user that is a member of the administrator group or any of its sub groups .