Class PermissionUtils
java.lang.Object
com.broadleafcommerce.data.tracking.core.policy.PermissionUtils
Convenience methods used for processing permissions and authorities
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetPermissionRoot
(String permission) Obtains the 'root' of the permission which is defined as anything that comes after one of thePermissionUtils.PermissionType.prefixes()
.
-
Method Details
-
getPermissionRoot
Obtains the 'root' of the permission which is defined as anything that comes after one of thePermissionUtils.PermissionType.prefixes()
. Example: given ALL_PRODUCT this will return PRODUCT and given SOME_PERMISSION this will return an empty optional- Parameters:
permission
- a permission- Returns:
- the root of permission or an empty Optional if permission does not
start with
PermissionUtils.PermissionType.prefixes()
- See Also:
-