本文整理匯總了Java中hudson.security.ACL.SYSTEM屬性的典型用法代碼示例。如果您正苦於以下問題:Java ACL.SYSTEM屬性的具體用法?Java ACL.SYSTEM怎麽用?Java ACL.SYSTEM使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類hudson.security.ACL
的用法示例。
在下文中一共展示了ACL.SYSTEM屬性的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: hasPermission
/**
* Checks if the given principal has permission to use the permission.
*
* @param auth the authentication object
* @param permission the permission
* @return true if the given principal has permission
*/
@Override
public boolean hasPermission(Authentication auth, Permission permission) {
if (auth == ACL.SYSTEM) {
return true;
}
if(isLoggedIn(auth)) {
GitLabUserDetails user = (GitLabUserDetails) auth.getPrincipal();
if (isPermissionSetStandard(user, permission)) {
return true;
}
}
return isPermissionSetAnon(permission);
}
示例2: findCredential
/**
* Finds a Perforce Credential based on the String id.
*
* @param id Credential ID
* @return a P4StandardCredentials credential or null if not found.
* @deprecated Use {@link #findCredential(String, ItemGroup)} or {@link #findCredential(String, Item)}
*/
@Deprecated
public static P4BaseCredentials findCredential(String id) {
Class<P4BaseCredentials> type = P4BaseCredentials.class;
Jenkins scope = Jenkins.getInstance();
Authentication acl = ACL.SYSTEM;
DomainRequirement domain = new DomainRequirement();
List<P4BaseCredentials> list;
list = CredentialsProvider.lookupCredentials(type, scope, acl, domain);
for (P4BaseCredentials c : list) {
if (c.getId().equals(id)) {
return c;
}
}
return null;
}
示例3: doFillCredentialItems
@Deprecated
static public ListBoxModel doFillCredentialItems() {
ListBoxModel list = new ListBoxModel();
Class<P4BaseCredentials> type = P4BaseCredentials.class;
Jenkins scope = Jenkins.getInstance();
Authentication acl = ACL.SYSTEM;
DomainRequirement domain = new DomainRequirement();
List<P4BaseCredentials> credentials;
credentials = CredentialsProvider.lookupCredentials(type, scope,
acl, domain);
if (credentials.isEmpty()) {
list.add("Select credential...", null);
}
for (P4BaseCredentials c : credentials) {
StringBuffer sb = new StringBuffer();
sb.append(c.getDescription());
sb.append(" (");
sb.append(c.getUsername());
sb.append(":");
sb.append(c.getP4port());
sb.append(")");
list.add(sb.toString(), c.getId());
}
return list;
}
示例4: lookupCredentials
private List<P4BaseCredentials> lookupCredentials() {
Class<P4BaseCredentials> type = P4BaseCredentials.class;
Jenkins scope = Jenkins.getInstance();
Authentication acl = ACL.SYSTEM;
DomainRequirement domain = new DomainRequirement();
return CredentialsProvider.lookupCredentials(type, scope, acl, domain);
}
示例5: getDefaultAuthentication
/** {@inheritDoc} */
@Override
@Nonnull
public Authentication getDefaultAuthentication() {
return ACL.SYSTEM;
}