mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 21:42:27 +00:00
[FIXED HUDSON-6628] There is some code duplication in main() methods between
CLICommand and the anonymous CLICommand subclass in CLIRegisterer.. the latter was missing the loadStoredAuthentication call which enables CLI login command. CLI login now works for CLI commands defined via @CLIMethod annotation. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@34178 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
becb2768bd
commit
99aaa67bec
1 file changed
+4
-1
@@ -148,7 +148,10 @@ public class CLIRegisterer extends ExtensionFinder {
|
||||
// fill up all the binders
|
||||
parser.parseArgument(args);
|
||||
|
||||
sc.setAuthentication(authenticator.authenticate()); // run the CLI with the right credential
|
||||
Authentication auth = authenticator.authenticate();
|
||||
if (auth==Hudson.ANONYMOUS)
|
||||
auth = loadStoredAuthentication();
|
||||
sc.setAuthentication(auth); // run the CLI with the right credential
|
||||
hudson.checkPermission(Hudson.READ);
|
||||
|
||||
// resolve them
|
||||
|
||||
Reference in new issue
Block a user