@Override public RoleModel addRole(String id, String name) { getDelegateForUpdate(); RoleModel role = updated.addRole(id, name); cacheSession.registerRoleInvalidation(role.getId()); return role; }
private void createObjects(RealmModel realm) { ClientModel app1 = realm.addClient("app1"); realm.addClient("app2"); realmManager.getSession().users().addUser(realm, "user1"); realmManager.getSession().users().addUser(realm, "user2"); realm.addRole("role1"); realm.addRole("role2"); app1.addRole("app1Role1"); app1.addScopeMapping(realm.getRole("role1")); realm.addClient("cl1"); }