Package com.composum.sling.core.service
Interface ServiceRestrictions
-
- All Known Implementing Classes:
ServiceRestrictionsImpl
@ProviderType public interface ServiceRestrictions
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ServiceRestrictions.Key
static class
ServiceRestrictions.Permission
static class
ServiceRestrictions.Restriction
-
Field Summary
Fields Modifier and Type Field Description static String
AUTHORIZABLE_RESTRICTION_PREFIX
static String
SA_PERMISSION
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
checkAuthorizables(@NotNull org.apache.sling.api.SlingHttpServletRequest request, @Nullable String restrictions)
Checks the restrictions for matching authorizable of the request id the restictions are 'authorizable' restrictions.ServiceRestrictions.Permission
getDefaultPermisson()
@NotNull ServiceRestrictions.Permission
getPermission(@Nullable ServiceRestrictions.Key key)
@Nullable String
getRestrictions(@Nullable ServiceRestrictions.Key key)
boolean
isPermissible(@Nullable org.apache.sling.api.SlingHttpServletRequest request, @Nullable ServiceRestrictions.Key key, @NotNull ServiceRestrictions.Permission needed)
boolean
isUserOptionAllowed(@NotNull org.apache.sling.api.SlingHttpServletRequest request, @NotNull ServiceRestrictions.Permission permission)
-
-
-
Field Detail
-
AUTHORIZABLE_RESTRICTION_PREFIX
static final String AUTHORIZABLE_RESTRICTION_PREFIX
- See Also:
- Constant Field Values
-
SA_PERMISSION
static final String SA_PERMISSION
-
-
Method Detail
-
isUserOptionAllowed
boolean isUserOptionAllowed(@NotNull @NotNull org.apache.sling.api.SlingHttpServletRequest request, @NotNull @NotNull ServiceRestrictions.Permission permission)
-
getDefaultPermisson
ServiceRestrictions.Permission getDefaultPermisson()
-
isPermissible
boolean isPermissible(@Nullable @Nullable org.apache.sling.api.SlingHttpServletRequest request, @Nullable @Nullable ServiceRestrictions.Key key, @NotNull @NotNull ServiceRestrictions.Permission needed)
-
getPermission
@NotNull @NotNull ServiceRestrictions.Permission getPermission(@Nullable @Nullable ServiceRestrictions.Key key)
-
getRestrictions
@Nullable @Nullable String getRestrictions(@Nullable @Nullable ServiceRestrictions.Key key)
-
checkAuthorizables
boolean checkAuthorizables(@NotNull @NotNull org.apache.sling.api.SlingHttpServletRequest request, @Nullable @Nullable String restrictions)
Checks the restrictions for matching authorizable of the request id the restictions are 'authorizable' restrictions.- Parameters:
request
- the current request to retrieve the current authorizable (user)restrictions
- the restrictions pattern string to check- Returns:
-
-