@Immutable public final class SecurityUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
getGuestUserDisplayName(Locale aDisplayLocale)
Get the display name of the guest user in the specified locale.
|
static String |
getUserDisplayName(IUser aUser,
Locale aDisplayLocale)
Get the display name of the user.
|
static String |
getUserDisplayName(String sUserID,
Locale aDisplayLocale)
Get the display name of the user.
|
static boolean |
hasCurrentUserRole(String sRoleID) |
static boolean |
isCurrentUserAssignedToUserGroup(String sUserGroupID) |
public static boolean isCurrentUserAssignedToUserGroup(@Nullable String sUserGroupID)
@Nullable public static String getGuestUserDisplayName(@Nonnull Locale aDisplayLocale)
aDisplayLocale - The locale to be used. May not be null.null if no translation is present.@Nullable public static String getUserDisplayName(@Nullable String sUserID, @Nonnull Locale aDisplayLocale)
sUserID - User ID. May be null.aDisplayLocale - The display locale to be used.@Nullable public static String getUserDisplayName(@Nullable IUser aUser, @Nonnull Locale aDisplayLocale)
aUser - User. May be null.aDisplayLocale - The display locale to be used to resolve the "Guest" text if the
passed user is null.null. Either the display name or the login name
of the user.Copyright © 2014–2015 Philip Helger. All rights reserved.