Package hudson.security
Class PermissionAdder
java.lang.Object
hudson.security.PermissionAdder
- All Implemented Interfaces:
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
add
(AuthorizationStrategy strategy, User user, Permission perm) Called to try to give a user global permission.
-
Constructor Details
-
PermissionAdder
public PermissionAdder()
-
-
Method Details
-
add
Called to try to give a user global permission.- Parameters:
strategy
- the configured authorization strategyuser
- a userperm
- a permission to grant, such asJenkins.ADMINISTER
- Returns:
- true if the permission was added, false if this service is incapable of handling it
-