Package coop.intergal.ui.security
Class SecurityUtils
- java.lang.Object
-
- coop.intergal.ui.security.SecurityUtils
-
public final class SecurityUtils extends Object
SecurityUtils takes care of all such static operations that have to do with security and querying rights from different beans of the UI.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetFilterMyData()static StringgetUsername()Gets the user name of the currently signed in user.static booleanisAccessGranted(Class<?> securedClass)Checks if access is granted for the current user for the given secured view, defined by the view class.static booleanisUserLoggedIn()Checks if the user is logged in.
-
-
-
Method Detail
-
getUsername
public static String getUsername()
Gets the user name of the currently signed in user.- Returns:
- the user name of the current user or
nullif the user has not signed in
-
getFilterMyData
public static String getFilterMyData()
-
isAccessGranted
public static boolean isAccessGranted(Class<?> securedClass)
Checks if access is granted for the current user for the given secured view, defined by the view class. (arroba)param securedClass (arroba)return true if access is granted, false otherwise.
-
isUserLoggedIn
public static boolean isUserLoggedIn()
Checks if the user is logged in.- Returns:
- true if the user is logged in. False otherwise.
-
-