當前位置: 首頁>>代碼示例>>Java>>正文


Java ACL.SYSTEM屬性代碼示例

本文整理匯總了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);
}
 
開發者ID:enil,項目名稱:gitlab-auth-plugin,代碼行數:22,代碼來源:GitLabGlobalACL.java

示例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;
}
 
開發者ID:p4paul,項目名稱:p4-jenkins,代碼行數:24,代碼來源:ConnectionHelper.java

示例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;
}
 
開發者ID:p4paul,項目名稱:p4-jenkins,代碼行數:28,代碼來源:P4CredentialsImpl.java

示例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);
}
 
開發者ID:p4paul,項目名稱:p4-jenkins,代碼行數:8,代碼來源:PerforceCredentialsTest.java

示例5: getDefaultAuthentication

/** {@inheritDoc} */
@Override
@Nonnull
public Authentication getDefaultAuthentication() {
  return ACL.SYSTEM;
}
 
開發者ID:jenkinsci,項目名稱:yaml-project-plugin,代碼行數:6,代碼來源:YamlMultiBranchProject.java


注:本文中的hudson.security.ACL.SYSTEM屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。