com.michelin.cio.hudson.plugins.rolestrategy
Class RoleBasedAuthorizationStrategy

java.lang.Object
  extended by hudson.model.AbstractDescribableImpl<hudson.security.AuthorizationStrategy>
      extended by hudson.security.AuthorizationStrategy
          extended by com.michelin.cio.hudson.plugins.rolestrategy.RoleBasedAuthorizationStrategy
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.security.AuthorizationStrategy>

public class RoleBasedAuthorizationStrategy
extends hudson.security.AuthorizationStrategy

Role-based authorization strategy.

Author:
Thomas Maurel

Nested Class Summary
static class RoleBasedAuthorizationStrategy.ConverterImpl
          Converter used to persist and retrieve the strategy from disk.
static class RoleBasedAuthorizationStrategy.DescriptorImpl
          Descriptor used to bind the strategy to the Web forms.
 
Nested classes/interfaces inherited from class hudson.security.AuthorizationStrategy
hudson.security.AuthorizationStrategy.Unsecured
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
static RoleBasedAuthorizationStrategy.DescriptorImpl DESCRIPTOR
           
static String GLOBAL
           
static String PROJECT
           
 
Fields inherited from class hudson.security.AuthorizationStrategy
LIST, UNSECURED
 
Constructor Summary
RoleBasedAuthorizationStrategy()
           
 
Method Summary
 hudson.security.ACL getACL(hudson.model.Job<?,?> project)
          Get the specific ACL for projects.
 SortedMap<Role,Set<String>> getGrantedRoles(String type)
          Get the roles from the global RoleMap.
 Collection<String> getGroups()
          Used by the container realm.
 hudson.security.SidACL getRootACL()
          Get the root ACL.
 Set<String> getSIDs(String type)
          Get all the SIDs referenced by specified RoleMap type.
 
Methods inherited from class hudson.security.AuthorizationStrategy
all, getACL, getACL, getACL, getACL, getACL, getACL, getACL
 
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GLOBAL

public static final String GLOBAL
See Also:
Constant Field Values

PROJECT

public static final String PROJECT
See Also:
Constant Field Values

DESCRIPTOR

@Extension
public static final RoleBasedAuthorizationStrategy.DescriptorImpl DESCRIPTOR
Constructor Detail

RoleBasedAuthorizationStrategy

public RoleBasedAuthorizationStrategy()
Method Detail

getRootACL

public hudson.security.SidACL getRootACL()
Get the root ACL.

Specified by:
getRootACL in class hudson.security.AuthorizationStrategy
Returns:
The global ACL

getACL

public hudson.security.ACL getACL(hudson.model.Job<?,?> project)
Get the specific ACL for projects.

Overrides:
getACL in class hudson.security.AuthorizationStrategy
Parameters:
project - The access-controlled project
Returns:
The project specific ACL

getGroups

public Collection<String> getGroups()
Used by the container realm.

Specified by:
getGroups in class hudson.security.AuthorizationStrategy
Returns:
All the sids referenced by the strategy

getGrantedRoles

public SortedMap<Role,Set<String>> getGrantedRoles(String type)
Get the roles from the global RoleMap.

The returned sorted map is unmodifiable.

Parameters:
type - The object type controlled by the RoleMap
Returns:
All roles from the global RoleMap

getSIDs

public Set<String> getSIDs(String type)
Get all the SIDs referenced by specified RoleMap type.

Parameters:
type - The object type controlled by the RoleMap
Returns:
All SIDs from the specified RoleMap.


Copyright © 2004-2011. All Rights Reserved.