|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.spring.security.SecurityUtil
public class SecurityUtil
Utility class for ZK spring security.
Constructor Summary | |
---|---|
SecurityUtil()
|
Method Summary | |
---|---|
static org.springframework.security.core.Authentication |
getAuthentication()
Return the current Authentication object. |
static java.lang.Object |
getAuthentication(java.lang.String property)
Return the evaluated result per the given property of the current Authentication object. |
static boolean |
isAccessible(java.lang.String hasPermission,
java.lang.Object domainObject)
Return true if the current Authentication has one of the specified permissions to the presented domain object instance. |
static boolean |
isAllGranted(java.lang.String authorities)
Return true if the authenticated principal is granted ALL of the roles specified in authorities. |
static boolean |
isAnyGranted(java.lang.String authorities)
Return true if the authenticated principal is granted ANY of the roles specified in authorities. |
static boolean |
isNoneGranted(java.lang.String authorities)
Return true if the authenticated principal is granted NONE of the roles specified in authorities. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SecurityUtil()
Method Detail |
---|
public static boolean isAccessible(java.lang.String hasPermission, java.lang.Object domainObject)
hasPermission
- A comma separated list of integers, each
representing a required bit mask permission from a subclass of
org.springframework.security.acl.basic.AbstractBasicAclEntry
.domainObject
- The actual domain object instance for which permissions
are being evaluated.
public static boolean isNoneGranted(java.lang.String authorities)
authorities
- A comma separated list of roles which the user must
have been granted NONE.
public static boolean isAllGranted(java.lang.String authorities)
authorities
- A comma separated list of roles which the user must have
been granted ALL.
public static boolean isAnyGranted(java.lang.String authorities)
authorities
- A comma separated list of roles which the user must have
been granted ANY.
public static org.springframework.security.core.Authentication getAuthentication()
public static java.lang.Object getAuthentication(java.lang.String property)
property
- Property of the Authentication object which would be
evaluated. Supports nested properties. For example if the principal
object is an instance of UserDetails, the property "principal.username"
will return the username. Alternatively, using "name" will call getName
method on the Authentication object directly.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |