hasPermissions
Checks if this feature has any permission restrictions.
This extension property returns true if the feature has at least one permission/role requirement, indicating that access control is enforced. Returns false for features with no permission restrictions (publicly accessible when enabled).
Example:
if (feature.hasPermissions) {
// Check user permissions before granting access
val userRoles = getUserRoles()
if (feature.permissions.any { it in userRoles }) {
enableFeature()
}
}Content copied to clipboard
Return
true if Feature.permissions is not empty, false otherwise