rename realm management app

This commit is contained in:
Bill Burke 2014-05-12 19:28:34 -04:00
parent eb9335f706
commit ea672e36ae
2 changed files with 9 additions and 3 deletions

View file

@ -89,7 +89,7 @@
"roles": ["manage-account"]
}
],
"aerogear-realm": [
"realm-management": [
{
"username": "admin",
"roles": ["realm-admin"]

View file

@ -121,10 +121,16 @@ public class RealmManager {
realm.addScopeMapping(adminConsole, adminRole);
}
public String getRealmAdminApplicationName(RealmModel realm) {
public String getMasterRealmAdminApplicationName(RealmModel realm) {
return realm.getName() + "-realm";
}
public String getRealmAdminApplicationName(RealmModel realm) {
return "realm-management";
}
protected void setupRealmDefaults(RealmModel realm) {
// brute force
realm.setBruteForceProtected(false); // default settings off for now todo set it on
@ -242,7 +248,7 @@ public class RealmManager {
ApplicationManager applicationManager = new ApplicationManager(new RealmManager(identitySession));
ApplicationModel realmAdminApp = applicationManager.createApplication(adminRealm, getRealmAdminApplicationName(realm));
ApplicationModel realmAdminApp = applicationManager.createApplication(adminRealm, getMasterRealmAdminApplicationName(realm));
realmAdminApp.setBearerOnly(true);
realm.setMasterAdminApp(realmAdminApp);