Skip to content

Commit

Permalink
Merge pull request #34 from oleg-nenashev/bug/JENKINS-47265
Browse files Browse the repository at this point in the history
[JENKINS-47265] - Stop requiring Matrix Auth flags to show Dangerous permissions
  • Loading branch information
oleg-nenashev committed Oct 4, 2017
2 parents 38e8f3c + 7205930 commit 566fb73
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>2.33</version>
<version>2.36</version>
</parent>

<artifactId>role-strategy</artifactId>
Expand Down Expand Up @@ -70,8 +70,14 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>matrix-auth</artifactId>
<version>1.0</version>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>cloudbees-folder</artifactId>
<version>5.18</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

Expand Down
Expand Up @@ -863,7 +863,7 @@ public boolean showPermission(String type, Permission p, boolean showDangerous)
// When disabled, never show the permissions
return showDangerous && DangerousPermissionHandlingMode.getCurrent() != DangerousPermissionHandlingMode.DISABLED;
}
return showPermission(p);
return p.getEnabled();
}
else if (type.equals(PROJECT)) {
return p == Item.CREATE && isCreateAllowed() && p.getEnabled() || p != Item.CREATE && p.getEnabled();
Expand Down

0 comments on commit 566fb73

Please sign in to comment.