org.sonar.api.security
Interface ResourcePermissions

All Superinterfaces:
ServerComponent, TaskComponent

public interface ResourcePermissions
extends TaskComponent, ServerComponent

Grant access to newly created projects.

This component is not supposed to be called by standard plugins.

Since:
3.2

Method Summary
 void grantDefaultRoles(Resource resource)
          Limitation - the resource id is used instead of logical key.
 void grantGroupRole(Resource resource, String groupName, String role)
          Limitation - the resource id is used instead of logical key.
 void grantUserRole(Resource resource, String login, String role)
          Limitation - the resource id is used instead of logical key.
 boolean hasRoles(Resource resource)
          Limitation - the resource id is used instead of logical key.
 

Method Detail

hasRoles

boolean hasRoles(Resource resource)
Limitation - the resource id is used instead of logical key.


grantDefaultRoles

void grantDefaultRoles(Resource resource)
Limitation - the resource id is used instead of logical key. Important note : the existing roles are overridden by default ones, so it's recommended to check that hasRoles(org.sonar.api.resources.Resource) is false before executing this method.


grantUserRole

void grantUserRole(Resource resource,
                   String login,
                   String role)
Limitation - the resource id is used instead of logical key.


grantGroupRole

void grantGroupRole(Resource resource,
                    String groupName,
                    String role)
Limitation - the resource id is used instead of logical key.



Copyright © 2009-2014 SonarSource. All Rights Reserved.