de.iai.ilcd.security
Class UserAccessBean

java.lang.Object
  extended by de.iai.ilcd.security.UserAccessBean

public class UserAccessBean
extends java.lang.Object


Constructor Summary
UserAccessBean()
           
 
Method Summary
 java.lang.String getUserName()
          Get the user name of the current user
 boolean hasRole(SecurityRole role)
          Check if current user has a specific role
 boolean hasRole(java.lang.String role)
          Check if current user has a specific role
 boolean isAdmin()
          Determine if current user is an admin user
 boolean isHasFullViewRights()
          Determine if current user has full view rights
 boolean isLoggedIn()
          Determine if user is logged in
 boolean isSuperAdmin()
          Determine if current user is a super admin user
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserAccessBean

public UserAccessBean()
Method Detail

isLoggedIn

public boolean isLoggedIn()
Determine if user is logged in

Returns:
true if user logged in, else false

isAdmin

public boolean isAdmin()
Determine if current user is an admin user

Returns:
true if user has role ADMIN, else false

isSuperAdmin

public boolean isSuperAdmin()
Determine if current user is a super admin user

Returns:
true if user user name of current user is "admin" (predefined account), else false

isHasFullViewRights

public boolean isHasFullViewRights()
Determine if current user has full view rights

Returns:
true if guests have full view rights by default (configuration) or current user has role EXPORT, else false

hasRole

public boolean hasRole(java.lang.String role)
Check if current user has a specific role

Parameters:
role - role name to check
Returns:
true if current user has the role (directly or via group roles), else false

hasRole

public boolean hasRole(SecurityRole role)
Check if current user has a specific role

Parameters:
role - role to check
Returns:
true if current user has the role (directly or via group roles), else false

getUserName

public java.lang.String getUserName()
Get the user name of the current user

Returns:
user name of the current user