本文整理了Java中hudson.model.Hudson.getAuthorizationStrategy()
方法的一些代码示例,展示了Hudson.getAuthorizationStrategy()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hudson.getAuthorizationStrategy()
方法的具体详情如下:
包路径:hudson.model.Hudson
类名称:Hudson
方法名:getAuthorizationStrategy
暂无
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
@Override
public boolean isApplicable(Class<? extends Job> jobType) {
// only applicable when ProjectMatrixAuthorizationStrategy is in charge
return Hudson.getInstance().getAuthorizationStrategy() instanceof ProjectMatrixAuthorizationStrategy;
}
代码示例来源:origin: hudson/hudson-2.x
@Override
public boolean isApplicable(Class<? extends Job> jobType) {
// only applicable when ProjectMatrixAuthorizationStrategy is in charge
return Hudson.getInstance().getAuthorizationStrategy() instanceof ProjectMatrixAuthorizationStrategy;
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
@Override
public boolean isApplicable(Class<? extends Job> jobType) {
// only applicable when ProjectMatrixAuthorizationStrategy is in charge
return Hudson.getInstance().getAuthorizationStrategy() instanceof ProjectMatrixAuthorizationStrategy;
}
代码示例来源:origin: org.jenkins-ci.plugins/collabnet
/**
* @param jobType
* @return true when the CNAuthorizationStrategy is in effect.
*/
@Override
public boolean isApplicable(Class<? extends Job> jobType) {
// only applicable when using CNAuthorizationStrategy
return Hudson.getInstance().getAuthorizationStrategy()
instanceof CNAuthorizationStrategy;
}
代码示例来源:origin: org.jenkins-ci.plugins/collabnet
/**
* Remove all cache entries and sets next expiration date
*/
private void clearCache() {
mPermSetMap.clear();
AuthorizationStrategy authStrategy = Hudson.getInstance().getAuthorizationStrategy();
CNAuthorizationStrategy cnAuthStrategy = (CNAuthorizationStrategy) authStrategy;
long permCacheTimeoutMs = cnAuthStrategy.getAuthCacheTimeoutMs();
mCacheExpirationDate = System.currentTimeMillis() + permCacheTimeoutMs;
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Returns the {@link ACL} for this object.
*/
public ACL getACL() {
return Hudson.getInstance().getAuthorizationStrategy().getACL(this);
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
public ACL getACL() {
final ACL base = Hudson.getInstance().getAuthorizationStrategy().getACL(this);
// always allow a non-anonymous user full control of himself.
return new ACL() {
public boolean hasPermission(Authentication a, Permission permission) {
return (a.getName().equals(id) && !(a instanceof AnonymousAuthenticationToken))
|| base.hasPermission(a, permission);
}
};
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Returns the {@link ACL} for this object.
* We need to override the identical method in AbstractItem because we won't
* call getACL(Job) otherwise (single dispatch)
*/
@Override
public ACL getACL() {
return Hudson.getInstance().getAuthorizationStrategy().getACL(this);
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Returns the {@link ACL} for this object.
* We need to override the identical method in AbstractItem because we won't
* call getACL(Job) otherwise (single dispatch)
*/
@Override
public ACL getACL() {
return Hudson.getInstance().getAuthorizationStrategy().getACL(this);
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
public ACL getACL() {
final ACL base = Hudson.getInstance().getAuthorizationStrategy().getACL(this);
// always allow a non-anonymous user full control of himself.
return new ACL() {
public boolean hasPermission(Authentication a, Permission permission) {
return (a.getName().equals(id) && !(a instanceof AnonymousAuthenticationToken))
|| base.hasPermission(a, permission);
}
};
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Returns the {@link ACL} for this object.
*/
public ACL getACL() {
return Hudson.getInstance().getAuthorizationStrategy().getACL(this);
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Returns the {@link ACL} for this object.
*/
public ACL getACL() {
return Hudson.getInstance().getAuthorizationStrategy().getACL(this);
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Returns the {@link ACL} for this object.
* We need to override the identical method in AbstractItem because we won't
* call getACL(Job) otherwise (single dispatch)
*/
@Override
public ACL getACL() {
return Hudson.getInstance().getAuthorizationStrategy().getACL(this);
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Returns the {@link ACL} for this object.
*/
public ACL getACL() {
return Hudson.getInstance().getAuthorizationStrategy().getACL(this);
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Returns the {@link ACL} for this object.
*/
public ACL getACL() {
return Hudson.getInstance().getAuthorizationStrategy().getACL(this);
}
代码示例来源:origin: hudson/hudson-2.x
public ACL getACL() {
final ACL base = Hudson.getInstance().getAuthorizationStrategy().getACL(this);
// always allow a non-anonymous user full control of himself.
return new ACL() {
public boolean hasPermission(Authentication a, Permission permission) {
return (a.getName().equals(id) && !(a instanceof AnonymousAuthenticationToken))
|| base.hasPermission(a, permission);
}
};
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Returns the {@link ACL} for this object.
*/
public ACL getACL() {
return Hudson.getInstance().getAuthorizationStrategy().getACL(this);
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Try to make this user a super-user
*/
private void tryToMakeAdmin(User u) {
AuthorizationStrategy as = Hudson.getInstance().getAuthorizationStrategy();
if (as instanceof GlobalMatrixAuthorizationStrategy) {
GlobalMatrixAuthorizationStrategy ma = (GlobalMatrixAuthorizationStrategy) as;
ma.add(Hudson.ADMINISTER,u.getId());
}
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Try to make this user a super-user
*/
private void tryToMakeAdmin(User u) {
AuthorizationStrategy as = Hudson.getInstance().getAuthorizationStrategy();
if (as instanceof GlobalMatrixAuthorizationStrategy) {
GlobalMatrixAuthorizationStrategy ma = (GlobalMatrixAuthorizationStrategy) as;
ma.add(Hudson.ADMINISTER, u.getId());
}
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Try to make this user a super-user
*/
private void tryToMakeAdmin(User u) {
AuthorizationStrategy as = Hudson.getInstance().getAuthorizationStrategy();
if (as instanceof GlobalMatrixAuthorizationStrategy) {
GlobalMatrixAuthorizationStrategy ma = (GlobalMatrixAuthorizationStrategy) as;
ma.add(Hudson.ADMINISTER,u.getId());
}
}
内容来源于网络,如有侵权,请联系作者删除!