File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
core/src/main/java/jenkins/security Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -189,14 +189,10 @@ public boolean matchesPassword(String token) {
189189 */
190190 private boolean hasPermissionToSeeToken () {
191191 // Administrators can do whatever they want
192- return canCurrentUserControlObject (true , user );
192+ return canCurrentUserControlObject (user );
193193 }
194194
195- private static boolean canCurrentUserControlObject (boolean trustAdmins , User propertyOwner ) {
196- if (trustAdmins && Jenkins .get ().hasPermission (Jenkins .ADMINISTER )) {
197- return true ;
198- }
199-
195+ private static boolean canCurrentUserControlObject (User propertyOwner ) {
200196 User current = User .current ();
201197 if (current == null ) { // Anonymous
202198 return false ;
@@ -539,7 +535,7 @@ public boolean mustDisplayLegacyApiToken(User propertyOwner) {
539535 // for Jelly view
540536 @ Restricted (NoExternalUse .class )
541537 public boolean hasCurrentUserRightToGenerateNewToken (User propertyOwner ) {
542- return canCurrentUserControlObject (true , propertyOwner );
538+ return canCurrentUserControlObject (propertyOwner );
543539 }
544540
545541 /**
You can’t perform that action at this time.
0 commit comments