Package net.sf.basedb.core.plugin
Class Permissions
java.lang.Object
net.sf.basedb.core.plugin.Permissions
This class holds permissions requested by a plugin. The server
admin may or may not grant all requested permissions.
- Version:
- 2.0
- Author:
- nicklas
- Last modified
- $Date: 2012-09-14 09:28:35 +0200 (fr, 14 sep 2012) $
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Set<Permission>
private final Item
private final Set<Permission>
-
Constructor Summary
ConstructorDescriptionPermissions
(Item itemType, Set<Permission> alwaysGranted, Set<Permission> maybeGranted) -
Method Summary
Modifier and TypeMethodDescriptionGet the permissions that the plugin always should be granted, even if the logged in user doesn't have the permissions already.Get the item type the permissions are valid for.Get the permissions that the plugin should be granted only if the logged in user already have the permissions.toString()
-
Field Details
-
itemType
-
alwaysGranted
-
maybeGranted
-
-
Constructor Details
-
Permissions
-
-
Method Details
-
getItemType
Get the item type the permissions are valid for. -
getAlwaysGranted
Get the permissions that the plugin always should be granted, even if the logged in user doesn't have the permissions already. This makes it possible for a plugin to do things that a user normally can't do.- Returns:
- A set with the permissions to grant, ot null to not grant any permissions
-
getMaybeGranted
Get the permissions that the plugin should be granted only if the logged in user already have the permissions. This is the normal operation for plugins which doesn't use permissions at all, but must be specified if permissions are used since the default is then to deny everything.- Returns:
- A set with the permissions to grant, ot null to not grant any permissions
-
toString
-