Commits

Stefan Saasen committed 831add7

Fix permissions so that administrators (not sysadmin) can configure the API Key (OnDemand)

  • Participants
  • Parent commits 787721b

Comments (0)

Files changed (2)

File src/main/java/com/atlassian/labs/hipchat/actions/SaveConfigurationAction.java

 
     @Override
     public boolean isPermitted() {
-        return permissionManager.hasPermission(getRemoteUser(), Permission.ADMINISTER, PermissionManager.TARGET_SYSTEM);
+        return permissionManager.isConfluenceAdministrator(getRemoteUser());
     }
 
     @SuppressWarnings("UnusedDeclaration")

File src/main/java/com/atlassian/labs/hipchat/actions/ViewConfigurationAction.java

 
     @Override
     public boolean isPermitted() {
-        return permissionManager.hasPermission(getRemoteUser(), Permission.ADMINISTER, PermissionManager.TARGET_SYSTEM);
+        return permissionManager.isConfluenceAdministrator(getRemoteUser());
     }
 
     public String getHipChatAuthToken() {