本文整理汇总了Java中hudson.security.PermissionGroup类的典型用法代码示例。如果您正苦于以下问题:Java PermissionGroup类的具体用法?Java PermissionGroup怎么用?Java PermissionGroup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PermissionGroup类属于hudson.security包,在下文中一共展示了PermissionGroup类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getGroups
import hudson.security.PermissionGroup; //导入依赖的package包/类
public List<PermissionGroup> getGroups(String typeString) {
AclType type = AclType.parseAclType(typeString);
List<PermissionGroup> groups;
switch (type) {
case GLOBAL: {
groups = new ArrayList<PermissionGroup>(
PermissionGroup.getAll());
groups.remove(PermissionGroup.get(Permission.class));
break;
}
case PROJECT: {
groups = new ArrayList<PermissionGroup>(
PermissionGroup.getAll());
groups.remove(PermissionGroup.get(Permission.class));
groups.remove(PermissionGroup.get(Jenkins.class));
groups.remove(PermissionGroup.get(Computer.class));
groups.remove(PermissionGroup.get(View.class));
break;
}
default:
groups = null;
}
return groups;
}
开发者ID:jenkinsci,项目名称:ssh2easy-plugin,代码行数:25,代码来源:CloudCIAuthorizationStrategy.java
示例2: createAdminRole
import hudson.security.PermissionGroup; //导入依赖的package包/类
private Project createAdminRole() {
Set<Permission> permissions = new HashSet<Permission>();
for (PermissionGroup group : getGroups(AclType.GLOBAL.getType())) {
for (Permission permission : group) {
permissions.add(permission);
}
}
Project role = new Project("admin", permissions);
return role;
}
开发者ID:jenkinsci,项目名称:ssh2easy-plugin,代码行数:11,代码来源:CloudCIAuthorizationStrategy.java
示例3: getApplicablePermissionGroups
import hudson.security.PermissionGroup; //导入依赖的package包/类
@Override
public Collection<PermissionGroup> getApplicablePermissionGroups() {
SortedSet<PermissionGroup> permissionGroups = new TreeSet<PermissionGroup>(PermissionGroup.getAll());
permissionGroups.remove(PermissionGroup.get(Permission.class));
return permissionGroups;
}
开发者ID:enil,项目名称:gitlab-auth-plugin,代码行数:8,代码来源:GitLabGlobalACL.java
示例4: getApplicablePermissionGroups
import hudson.security.PermissionGroup; //导入依赖的package包/类
@Override
public Collection<PermissionGroup> getApplicablePermissionGroups() {
return asList(PermissionGroup.get(Item.class), PermissionGroup.get(View.class));
}
开发者ID:enil,项目名称:gitlab-auth-plugin,代码行数:5,代码来源:GitLabFolderACL.java
示例5: addPermissionGroup
import hudson.security.PermissionGroup; //导入依赖的package包/类
/**
* Adds all permissions from a permission group for the given identity.
*
* @param identity the identity
* @param permissionGroup the permission group
*/
public void addPermissionGroup(GitLabPermissionIdentity identity, PermissionGroup permissionGroup) {
addPermissions(identity, permissionGroup.getPermissions());
}
开发者ID:enil,项目名称:gitlab-auth-plugin,代码行数:10,代码来源:GitLabGrantedPermissions.java
示例6: addPermissionGroups
import hudson.security.PermissionGroup; //导入依赖的package包/类
/**
* Adds all permissions from multiple permission groups for the given identity.
*
* @param identity the identity
* @param permissionGroups the permission groups
*/
public void addPermissionGroups(GitLabPermissionIdentity identity, Iterable<PermissionGroup> permissionGroups) {
for (final PermissionGroup permissionGroup : permissionGroups) {
addPermissionGroup(identity, permissionGroup);
}
}
开发者ID:enil,项目名称:gitlab-auth-plugin,代码行数:12,代码来源:GitLabGrantedPermissions.java
示例7: getApplicablePermissionGroups
import hudson.security.PermissionGroup; //导入依赖的package包/类
/**
* Gets the permission groups which are applicable for the ACL.
*
* @return an iterable collection of permission groups
*/
public abstract Collection<PermissionGroup> getApplicablePermissionGroups();
开发者ID:enil,项目名称:gitlab-auth-plugin,代码行数:7,代码来源:GitLabAbstractACL.java
注:本文中的hudson.security.PermissionGroup类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论