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 Permission
s.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 functionality
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–2019 The Apache Software Foundation. All rights reserved.