public interface Permission
Realm implementations, and only those
implementations really determine how a user 'has' a permission or not. The Realm could use the semantics described
here, or it could utilize some other mechanism entirely - it is always up to the application developer.
Shiro provides a very powerful default implementation of this interface in the form of the
WildcardPermission. We highly recommend that you
investigate this class before trying to implement your own Permissions.WildcardPermission| Modifier and Type | Method and Description |
|---|---|
boolean |
implies(Permission p)
Returns
true if this current instance implies all the functionality and/or resource access
described by the specified Permission argument, false otherwise. |
boolean implies(Permission p)
true if this current instance implies all the functionality and/or resource access
described by the specified Permission argument, false otherwise.
That is, this current instance must be exactly equal to or a superset of the functionalty
and/or resource access described by the given Permission argument. Yet another way of saying this
would be:
If "permission1 implies permission2", i.e. permission1.implies(permission2) ,
then any Subject granted permission1 would have ability greater than or equal to that defined by
permission2.
p - the permission to check for behavior/functionality comparison.true if this current instance implies all the functionality and/or resource access
described by the specified Permission argument, false otherwise.Copyright © 2004-2016 The Apache Software Foundation. All Rights Reserved.