this.componentFinder = componentFinder;
}
- /**
- * Used by Ruby on Rails
- */
- public List<String> globalPermissions() {
- return GlobalPermissions.ALL;
- }
-
public void applyDefaultPermissionTemplate(String componentKey) {
DbSession session = dbClient.openSession(false);
try {
component(Java::OrgSonarApiComponent::RubyComponentService.java_class)
end
- # TODO to delete
- def self.permissions
- component(Java::OrgSonarServerPermission::PermissionService.java_class)
- end
-
- def self.permission_templates
- component(Java::OrgSonarServerPermission::PermissionTemplateService.java_class)
- end
-
def self.debt
component(Java::OrgSonarServerDebt::DebtModelService.java_class)
end
def has_role?(role, objects=nil)
role = role.to_s
if objects.nil?
- if Internal.permissions.globalPermissions().include?(role)
+ if Java::OrgSonarCorePermission::GlobalPermissions::ALL.include?(role)
AuthorizerFactory.authorizer.has_role?(self, role.to_sym)
else
# There's no concept of global users or global codeviewers.