use of org.simbasecurity.core.domain.GroupEntity in project simba-os by cegeka.
the class GroupDatabaseRepositoryTest method setUp.
@Before
public void setUp() {
group = new GroupEntity(DUMMY_GROUP_NAME, DUMMY_GROUP_CN);
group2 = new GroupEntity(DUMMY_GROUP_NAME, "otherCN");
persistAndRefresh(group, group2);
}
use of org.simbasecurity.core.domain.GroupEntity in project simba-os by cegeka.
the class RuleDatabaseRepositoryTest method setupWithGroups.
private ResourceRule setupWithGroups() {
User user = new UserEntity(USER_VIA_GROUP);
Role role = new RoleEntity("role2");
Group group = new GroupEntity("groupName", "cn");
Policy policy = new PolicyEntity("policy2");
ResourceRule resourceRuleEntity = new ResourceRuleEntity("resrule2");
resourceRuleEntity.setResourceName("resname2");
urlRuleEntityViaGroup = new URLRuleEntity("urlrule2");
persistAndRefresh(user, role, policy, resourceRuleEntity, urlRuleEntityViaGroup);
persistAndRefresh(user, group, role, policy, resourceRuleEntity, urlRuleEntityViaGroup);
policy.addRule(resourceRuleEntity);
policy.addRule(urlRuleEntityViaGroup);
role.addPolicy(policy);
group.addRole(role);
user.addGroup(group);
return resourceRuleEntity;
}
Aggregations