]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8716 Deprecate UserSession#checkPermission(String)
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Sun, 29 Jan 2017 15:43:33 +0000 (16:43 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 1 Feb 2017 16:11:52 +0000 (17:11 +0100)
server/sonar-server/src/main/java/org/sonar/server/user/UserSession.java

index 3e456ca739324430d08d27a4d2587adbdf20eb1e..b2419e2294c20ff1f3ca35eb89f2d96a3604c815 100644 (file)
@@ -72,7 +72,12 @@ public interface UserSession {
 
   /**
    * Ensures that permission is granted to user, otherwise throws a {@link org.sonar.server.exceptions.ForbiddenException}.
+   * @deprecated in 6.3 because it doesn't support organizations
+   *
+   * @see #checkIsRoot() for system administrators
+   * @see #checkOrganizationPermission(String, String) for organization members
    */
+  @Deprecated
   UserSession checkPermission(String globalPermission);
 
   /**
@@ -89,6 +94,8 @@ public interface UserSession {
   /**
    * Returns {@code true} if the permission is granted on the organization, else {@code false}.
    * Root status is not verified, so the method may return {@code false} even for root users.
+   *
+   * @see org.sonar.core.permission.GlobalPermissions
    */
   boolean hasOrganizationPermission(String organizationUuid, String permission);