public ServerGroupEffectConstraint(List<String> allowed) { this.user = true; this.global = false; this.nonServerHost = false; this.unassigned = false; this.groupsHolder = new GroupsHolder(allowed); this.readOnly = false; this.groupAdd = false; this.groupRemove = false; this.readOnlyConstraint = new ServerGroupEffectConstraint(groupsHolder); }
public ServerGroupEffectConstraint(List<String> allowed) { this.user = true; this.global = false; this.unassigned = false; this.groupsHolder = new GroupsHolder(allowed); this.readOnly = false; this.groupAdd = false; this.groupRemove = false; this.readOnlyConstraint = new ServerGroupEffectConstraint(groupsHolder, true); }
public ServerGroupEffectConstraint(List<String> allowed) { this.user = true; this.global = false; this.nonServerHost = false; this.unassigned = false; this.groupsHolder = new GroupsHolder(allowed); this.readOnly = false; this.groupAdd = false; this.groupRemove = false; this.readOnlyConstraint = new ServerGroupEffectConstraint(groupsHolder); }
static void addScopedRole(final String roleName, final String baseRole, final List<ModelNode> serverGroupNodes, final WritableAuthorizerConfiguration authorizerConfiguration, final Map<String, ServerGroupEffectConstraint> constraintMap) { List<String> serverGroups = new ArrayList<String>(); for (ModelNode group : serverGroupNodes) { serverGroups.add(group.asString()); } ServerGroupEffectConstraint constraint = new ServerGroupEffectConstraint(serverGroups); authorizerConfiguration.addScopedRole(new AuthorizerConfiguration.ScopedRole(roleName, baseRole, constraint)); constraintMap.put(roleName, constraint); } }
static void addScopedRole(final String roleName, final String baseRole, final List<ModelNode> serverGroupNodes, final WritableAuthorizerConfiguration authorizerConfiguration, final Map<String, ServerGroupEffectConstraint> constraintMap) { List<String> serverGroups = new ArrayList<String>(); for (ModelNode group : serverGroupNodes) { serverGroups.add(group.asString()); } ServerGroupEffectConstraint constraint = new ServerGroupEffectConstraint(serverGroups); authorizerConfiguration.addScopedRole(new AuthorizerConfiguration.ScopedRole(roleName, baseRole, constraint)); constraintMap.put(roleName, constraint); } }
private Constraint getRequiredConstraint(ServerGroupEffect serverGroupEffect) { if (serverGroupEffect == null || serverGroupEffect.isServerGroupEffectGlobal()) { return GLOBAL_REQUIRED; } else if (serverGroupEffect.isServerGroupEffectUnassigned()) { return UNASSIGNED; } return new ServerGroupEffectConstraint(serverGroupEffect.getAffectedServerGroups(), serverGroupEffect.isServerGroupAdd(), serverGroupEffect.isServerGroupRemove()); }
private Constraint getRequiredConstraint(ServerGroupEffect serverGroupEffect, HostEffect hostEffect) { boolean nonServerHost = hostEffect != null && !hostEffect.isHostEffectGlobal() && !hostEffect.isServerEffect(); if (serverGroupEffect == null || serverGroupEffect.isServerGroupEffectGlobal()) { if (nonServerHost) { return HOST_GLOBAL_REQUIRED; } return DOMAIN_GLOBAL_REQUIRED; } else if (serverGroupEffect.isServerGroupEffectUnassigned()) { return UNASSIGNED; } return new ServerGroupEffectConstraint(serverGroupEffect.getAffectedServerGroups(), nonServerHost, serverGroupEffect.isServerGroupAdd(), serverGroupEffect.isServerGroupRemove()); }
private Constraint getRequiredConstraint(ServerGroupEffect serverGroupEffect, HostEffect hostEffect) { boolean nonServerHost = hostEffect != null && !hostEffect.isHostEffectGlobal() && !hostEffect.isServerEffect(); if (serverGroupEffect == null || serverGroupEffect.isServerGroupEffectGlobal()) { if (nonServerHost) { return HOST_GLOBAL_REQUIRED; } return DOMAIN_GLOBAL_REQUIRED; } else if (serverGroupEffect.isServerGroupEffectUnassigned()) { return UNASSIGNED; } return new ServerGroupEffectConstraint(serverGroupEffect.getAffectedServerGroups(), nonServerHost, serverGroupEffect.isServerGroupAdd(), serverGroupEffect.isServerGroupRemove()); }