Class SpecificUsersAuthorizationStrategy.DescriptorImpl
- java.lang.Object
-
- hudson.model.Descriptor<AuthorizeProjectStrategy>
-
- org.jenkinsci.plugins.authorizeproject.AuthorizeProjectStrategyDescriptor
-
- org.jenkinsci.plugins.authorizeproject.strategy.SpecificUsersAuthorizationStrategy.DescriptorImpl
-
- Enclosing class:
- SpecificUsersAuthorizationStrategy
@Extension public static class SpecificUsersAuthorizationStrategy.DescriptorImpl extends AuthorizeProjectStrategyDescriptor
Our descriptor.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
-
-
Field Summary
-
Fields inherited from class hudson.model.Descriptor
clazz
-
-
Constructor Summary
Constructors Constructor Description DescriptorImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
calcCheckPasswordRequestedUrl()
Helper method for computing the check password URL.FormValidation
doCheckDontRestrictJobConfiguration(boolean dontRestrictJobConfiguration)
Display warnings fordontRestrictJobConfiguration
"Don't restrict job configuration" can cause security issues when used with inappropriate access controls, and display for a waning message for that.FormValidation
doCheckPassword(org.kohsuke.stapler.StaplerRequest req, String userid, String password, String apitoken, boolean useApitoken)
Checks the supplied password.String
doCheckPasswordRequested(org.kohsuke.stapler.StaplerRequest req, String userid)
Checks password field is required in configuration page.FormValidation
doCheckUserid(String userid)
Checks the userid against the blacklist of invalid users.String
getDisplayName()
boolean
isEnabledByDefault()
SpecificUsersAuthorizationStrategy
should be disabled by default for JENKINS-28298boolean
isUseApitoken()
Checks if the currentSecurityRealm
supports username/password authentication.-
Methods inherited from class org.jenkinsci.plugins.authorizeproject.AuthorizeProjectStrategyDescriptor
configureFromGlobalSecurity, getConfigFile, getDescriptorsForGlobalSecurityConfigPage, getGlobalSecurityConfigPage, isApplicableToGlobal
-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
getDisplayName
public String getDisplayName()
- Overrides:
getDisplayName
in classDescriptor<AuthorizeProjectStrategy>
-
calcCheckPasswordRequestedUrl
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public String calcCheckPasswordRequestedUrl()
Helper method for computing the check password URL.- Returns:
- the URL to check password field is required.
-
doCheckPasswordRequested
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public String doCheckPasswordRequested(org.kohsuke.stapler.StaplerRequest req, @QueryParameter String userid)
Checks password field is required in configuration page.This is called asynchronously.
- Parameters:
req
- the request.userid
- the userid.- Returns:
- "true" if password field is required. this should be evaluated as JavaScript.
-
doCheckUserid
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public FormValidation doCheckUserid(@QueryParameter String userid)
Checks the userid against the blacklist of invalid users.- Parameters:
userid
- the userid- Returns:
- the validation results.
-
doCheckPassword
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public FormValidation doCheckPassword(org.kohsuke.stapler.StaplerRequest req, @QueryParameter String userid, @QueryParameter String password, @QueryParameter String apitoken, @QueryParameter boolean useApitoken)
Checks the supplied password.- Parameters:
req
- the request.userid
- the user id.password
- the password.- Returns:
- the validation results
-
doCheckDontRestrictJobConfiguration
public FormValidation doCheckDontRestrictJobConfiguration(@QueryParameter boolean dontRestrictJobConfiguration)
Display warnings fordontRestrictJobConfiguration
"Don't restrict job configuration" can cause security issues when used with inappropriate access controls, and display for a waning message for that.- Parameters:
dontRestrictJobConfiguration
- whether not to restrict job configuration- Returns:
- a warning message for
dontRestrictJobConfiguration
if it istrue
- See Also:
SpecificUsersAuthorizationStrategy.setDontRestrictJobConfiguration(boolean)
-
isUseApitoken
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isUseApitoken()
Checks if the currentSecurityRealm
supports username/password authentication.- Returns:
true
if and only if the current realm supports username/password authentication.
-
isEnabledByDefault
public boolean isEnabledByDefault()
SpecificUsersAuthorizationStrategy
should be disabled by default for JENKINS-28298- Overrides:
isEnabledByDefault
in classAuthorizeProjectStrategyDescriptor
- Returns:
- false
- See Also:
AuthorizeProjectStrategyDescriptor.isEnabledByDefault()
-
-