roleInfo.setUserDataConstraint(UserDataConstraint.None);
public void combine(RoleInfo other) { if (other._forbidden) setForbidden(true); else if (!other._checked) // TODO is this the right way around??? setChecked(true); else if (other._isAnyRole) setAnyRole(true); else if (other._isAnyAuth) setAnyAuth(true); else if (!_isAnyRole) { for (String r : other._roles) _roles.add(r); } setUserDataConstraint(other._userDataConstraint); }
ri.setUserDataConstraint(userDataConstraint);
public void combine(RoleInfo other) { if (other._forbidden) setForbidden(true); else if (!other._checked) // TODO is this the right way around??? setChecked(true); else if (other._isAnyRole) setAnyRole(true); else if (!_isAnyRole) { for (String r : other._roles) _roles.add(r); } setUserDataConstraint(other._userDataConstraint); }
public void combine(RoleInfo other) { if (other._forbidden) setForbidden(true); else if (!other._checked) // TODO is this the right way around??? setChecked(true); else if (other._isAnyRole) setAnyRole(true); else if (!_isAnyRole) { for (String r : other._roles) _roles.add(r); } setUserDataConstraint(other._userDataConstraint); }
public void combine(RoleInfo other) { if (other._forbidden) setForbidden(true); else if (!other._checked) // TODO is this the right way around??? setChecked(true); else if (other._isAnyRole) setAnyRole(true); else if (!_isAnyRole) { for (String r : other._roles) _roles.add(r); } setUserDataConstraint(other._userDataConstraint); }
public void combine(RoleInfo other) { if (other._forbidden) setForbidden(true); else if (!other._checked) // TODO is this the right way around??? setChecked(true); else if (other._isAnyRole) setAnyRole(true); else if (!_isAnyRole) { for (String r : other._roles) _roles.add(r); } setUserDataConstraint(other._userDataConstraint); }
public void combine(RoleInfo other) { if (other._forbidden) setForbidden(true); else if (!other._checked) // TODO is this the right way around??? setChecked(true); else if (other._isAnyRole) setAnyRole(true); else if (!_isAnyRole) { for (String r : other._roles) _roles.add(r); } setUserDataConstraint(other._userDataConstraint); }
public void combine(RoleInfo other) { if (other._forbidden) setForbidden(true); else if (!other._checked) // TODO is this the right way around??? setChecked(true); else if (other._isAnyRole) setAnyRole(true); else if (!_isAnyRole) { for (String r : other._roles) _roles.add(r); } setUserDataConstraint(other._userDataConstraint); }
roleInfo.setUserDataConstraint(UserDataConstraint.None);
roleInfo.setUserDataConstraint(UserDataConstraint.None);
roleInfo.setUserDataConstraint(UserDataConstraint.None);
public void combine(RoleInfo other) { if (other._forbidden) setForbidden(true); else if (!other._checked) // TODO is this the right way around??? setChecked(true); else if (other._isAnyRole) setAnyRole(true); else if (other._isAnyAuth) setAnyAuth(true); else if (!_isAnyRole) { for (String r : other._roles) _roles.add(r); } setUserDataConstraint(other._userDataConstraint); }
public void combine(RoleInfo other) { if (other._forbidden) setForbidden(true); else if (!other._checked) // TODO is this the right way around??? setChecked(true); else if (other._isAnyRole) setAnyRole(true); else if (other._isAnyAuth) setAnyAuth(true); else if (!_isAnyRole) { for (String r : other._roles) _roles.add(r); } setUserDataConstraint(other._userDataConstraint); }
public void combine(RoleInfo other) { if (other._forbidden) setForbidden(true); else if (!other._checked) // TODO is this the right way around??? setChecked(true); else if (other._isAnyRole) setAnyRole(true); else if (other._isAnyAuth) setAnyAuth(true); else if (!_isAnyRole) { for (String r : other._roles) _roles.add(r); } setUserDataConstraint(other._userDataConstraint); }
private void addConstraint(RoleInfo roleInfo, Constraint constraint) { if (roleInfo.isForbidden()) return; boolean forbidden = constraint.isForbidden(); roleInfo.setForbidden(forbidden); if (!forbidden) { UserDataConstraint userDataConstraint = UserDataConstraint.get(constraint.getDataConstraint()); roleInfo.setUserDataConstraint(userDataConstraint); boolean checked = constraint.getAuthenticate(); roleInfo.setChecked(checked); if (roleInfo.isChecked()) { if (constraint.isAnyRole()) { if (strict) { // * means "all defined roles" for (String role : roles) roleInfo.addRole(role); } else // * means any role roleInfo.setAnyRole(true); } else { String[] newRoles = constraint.getRoles(); for (String role : newRoles) { if (strict && !roles.contains(role)) throw new IllegalArgumentException("Attempt to use undeclared role: " + role + ", known roles: " + roles); roleInfo.addRole(role); } } } } }
ri.setUserDataConstraint(userDataConstraint);
ri.setUserDataConstraint(userDataConstraint);
ri.setUserDataConstraint(userDataConstraint);
ri.setUserDataConstraint(userDataConstraint);