本文整理汇总了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;
}
示例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;
}
示例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;
}
示例4: getApplicablePermissionGroups
import hudson.security.PermissionGroup; //导入依赖的package包/类
@Override
public Collection<PermissionGroup> getApplicablePermissionGroups() {
return asList(PermissionGroup.get(Item.class), PermissionGroup.get(View.class));
}
示例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());
}
示例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);
}
}
示例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();