Expose display name and locales when user has ANY admin role (#27160)
* chore: expose display name and locales when user has view-realm Signed-off-by: Peter Keuter <github@peterkeuter.nl> * fix: supportedlocales are available as stream Signed-off-by: Peter Keuter <github@peterkeuter.nl> * fix: tests Signed-off-by: Peter Keuter <github@peterkeuter.nl> * fix: remove unnecessarily added ignore Signed-off-by: Peter Keuter <github@peterkeuter.nl> --------- Signed-off-by: Peter Keuter <github@peterkeuter.nl>
This commit is contained in:
parent
daa6cf5951
commit
01d66a662b
2 changed files with 6 additions and 1 deletions
|
@ -380,6 +380,10 @@ public class RealmAdminResource {
|
|||
|
||||
RealmRepresentation rep = new RealmRepresentation();
|
||||
rep.setRealm(realm.getName());
|
||||
rep.setDefaultLocale(realm.getDefaultLocale());
|
||||
rep.setDisplayName(realm.getDisplayName());
|
||||
rep.setDisplayNameHtml(realm.getDisplayNameHtml());
|
||||
rep.setSupportedLocales(realm.getSupportedLocalesStream().collect(Collectors.toSet()));
|
||||
|
||||
if (auth.users().canView()) {
|
||||
rep.setRegistrationEmailAsUsername(realm.isRegistrationEmailAsUsername());
|
||||
|
|
|
@ -2057,7 +2057,8 @@ public class PermissionsTest extends AbstractKeycloakTest {
|
|||
}
|
||||
|
||||
private void assertGettersEmpty(RealmRepresentation rep) {
|
||||
assertGettersEmpty(rep, "getRealm", "getAttributesOrEmpty");
|
||||
assertGettersEmpty(rep, "getRealm", "getAttributesOrEmpty", "getDisplayNameHtml",
|
||||
"getDisplayName", "getDefaultLocale", "getSupportedLocales");
|
||||
}
|
||||
|
||||
private void assertGettersEmpty(ClientRepresentation rep) {
|
||||
|
|
Loading…
Reference in a new issue