Class PermissionAdder

java.lang.Object
hudson.security.PermissionAdder
All Implemented Interfaces:
ExtensionPoint

public abstract class PermissionAdder extends Object implements ExtensionPoint
Service which can add permissions for a given user to the configured authorization strategy. Useful e.g. to make the first user created in the system be automatically granted administer privilege.
Since:
1.535
  • Constructor Details

    • PermissionAdder

      public PermissionAdder()
  • Method Details

    • add

      public abstract boolean add(AuthorizationStrategy strategy, User user, Permission perm)
      Called to try to give a user global permission.
      Parameters:
      strategy - the configured authorization strategy
      user - a user
      perm - a permission to grant, such as Jenkins.ADMINISTER
      Returns:
      true if the permission was added, false if this service is incapable of handling it