Class Permissions

java.lang.Object
net.sf.basedb.core.plugin.Permissions

public class Permissions
extends Object
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 Details

    • itemType

      private final Item itemType
    • alwaysGranted

      private final Set<Permission> alwaysGranted
    • maybeGranted

      private final Set<Permission> maybeGranted
  • Constructor Details

  • Method Details

    • getItemType

      public Item getItemType()
      Get the item type the permissions are valid for.
    • getAlwaysGranted

      public Set<Permission> 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

      public Set<Permission> 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

      public String toString()
      Overrides:
      toString in class Object