From 21d26b2b4dbc8d47e9972f45d402f86448b47f48 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Thu, 12 Jul 2012 00:08:27 +0200 Subject: Improve and refactor the ResourcePermissions component --- .../sonar/api/security/ResourcePermissioning.java | 41 ---------------------- .../sonar/api/security/ResourcePermissions.java | 41 ++++++++++++++++++++++ 2 files changed, 41 insertions(+), 41 deletions(-) delete mode 100644 sonar-plugin-api/src/main/java/org/sonar/api/security/ResourcePermissioning.java create mode 100644 sonar-plugin-api/src/main/java/org/sonar/api/security/ResourcePermissions.java (limited to 'sonar-plugin-api') diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/security/ResourcePermissioning.java b/sonar-plugin-api/src/main/java/org/sonar/api/security/ResourcePermissioning.java deleted file mode 100644 index 270dd52f8d3..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/security/ResourcePermissioning.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2008-2012 SonarSource - * mailto:contact AT sonarsource DOT com - * - * Sonar is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * Sonar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Sonar; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - */ -package org.sonar.api.security; - -import org.sonar.api.BatchComponent; -import org.sonar.api.resources.Resource; - -/** - * Grant access to newly created projects. - * - *

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

- * - * @since 3.2 - */ -public interface ResourcePermissioning extends BatchComponent { - - boolean hasRoles(Resource resource); - - void grantDefaultRoles(Resource resource); - - void grantUserRole(Resource resource, String login, String role); - - void grantGroupRole(Resource resource, String groupName, String role); -} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/security/ResourcePermissions.java b/sonar-plugin-api/src/main/java/org/sonar/api/security/ResourcePermissions.java new file mode 100644 index 00000000000..e63d963455d --- /dev/null +++ b/sonar-plugin-api/src/main/java/org/sonar/api/security/ResourcePermissions.java @@ -0,0 +1,41 @@ +/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2012 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Sonar is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.security; + +import org.sonar.api.BatchComponent; +import org.sonar.api.resources.Resource; + +/** + * Grant access to newly created projects. + * + *

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

+ * + * @since 3.2 + */ +public interface ResourcePermissions extends BatchComponent { + + boolean hasRoles(Resource resource); + + void grantDefaultRoles(Resource resource); + + void grantUserRole(Resource resource, String login, String role); + + void grantGroupRole(Resource resource, String groupName, String role); +} -- cgit v1.2.3