| |
|
| java.lang.Object za.org.coefficient.util.ejb.SecurityUtil
SecurityUtil | public class SecurityUtil implements Serializable(Code) | | This is a utility class that allows access to users and roles in
the system
|
GUEST_ROLE_DESC | final public static String GUEST_ROLE_DESC(Code) | | |
GUEST_ROLE_VAL | final public static long GUEST_ROLE_VAL(Code) | | |
PROJECT_CHAMPION_ROLE_DESC | final public static String PROJECT_CHAMPION_ROLE_DESC(Code) | | |
PROJECT_CHAMPION_ROLE_VAL | final public static long PROJECT_CHAMPION_ROLE_VAL(Code) | | |
PROJECT_MEMBER_ROLE_DESC | final public static String PROJECT_MEMBER_ROLE_DESC(Code) | | |
PROJECT_MEMBER_ROLE_VAL | final public static long PROJECT_MEMBER_ROLE_VAL(Code) | | |
SITE_ADMIN_ROLE_DESC | final public static String SITE_ADMIN_ROLE_DESC(Code) | | |
SITE_ADMIN_ROLE_VAL | final public static long SITE_ADMIN_ROLE_VAL(Code) | | |
SITE_MEMBER_ROLE_DESC | final public static String SITE_MEMBER_ROLE_DESC(Code) | | |
SITE_MEMBER_ROLE_VAL | final public static long SITE_MEMBER_ROLE_VAL(Code) | | |
SITE_MODERATOR_ROLE_DESC | final public static String SITE_MODERATOR_ROLE_DESC(Code) | | |
SITE_MODERATOR_ROLE_VAL | final public static long SITE_MODERATOR_ROLE_VAL(Code) | | |
getHighestRoleForUser | public static Role getHighestRoleForUser(CoefficientUser user, Project project)(Code) | | This is used to determine the correct role in the role hierarchy for
a user. The hierarchy is from highest to lowest:
1. SecurityUtil.SITE_ADMIN_ROLE_DESC - a system/project role
2. SecurityUtil.PROJECT_CHAMPION_ROLE_DESC - a project role
3. SecurityUtil.PROJECT_MEMBER_ROLE_DESC - a project role
4. SecurityUtil.SITE_MEMBER_ROLE_DESC - a system role
5. SecurityUtil.GUEST_ROLE_DESC - a system/project role
Parameters: user - is the user to determine the role for, if null then thismethod will return the guest role Parameters: project - is the project obtained from a context. If null thenthe role returned will be obtainedfrom the system role contained in the user is the highest role associated with the current user giventhe project information |
getRoleForDescription | public static Role getRoleForDescription(String roleDescription)(Code) | | |
getRoleForValue | public static synchronized Role getRoleForValue(long roleValue)(Code) | | |
getRoles | public static synchronized List getRoles()(Code) | | |
getUsersWithSystemRole | public static List getUsersWithSystemRole(Role role)(Code) | | |
md5 | public static byte[] md5(String text)(Code) | | Computes an md5 hash of a string.
Parameters: text - the hashed string the string hash exception: NullPointerException - if text is null |
md5AsHexString | public static String md5AsHexString(String text)(Code) | | Computes an md5 hash and returns the result as a string
made of hexadecimal HEX_ALPHABET whose.
Parameters: text - the hashed string the string hash exception: NullPointerException - if text is null |
|
|
|