fix cors example
This commit is contained in:
1 parent
19e1ddff1d
commit
790fd1d94d
9 files changed
+20
-14
No files matched your search
@@ -181,6 +181,9 @@ public class RepresentationToModel {
|
||||
if (rep.getScopeMappings() != null) {
|
||||
for (ScopeMappingRepresentation scope : rep.getScopeMappings()) {
|
||||
ClientModel client = newRealm.findClient(scope.getClient());
|
||||
if (client == null) {
|
||||
throw new RuntimeException("Unknown client specification in realm scope mappings");
|
||||
}
|
||||
for (String roleString : scope.getRoles()) {
|
||||
RoleModel role = newRealm.getRole(roleString.trim());
|
||||
if (role == null) {
|
||||
@@ -558,6 +561,9 @@ public class RepresentationToModel {
|
||||
public static void createApplicationScopeMappings(RealmModel realm, ApplicationModel applicationModel, List<ScopeMappingRepresentation> mappings) {
|
||||
for (ScopeMappingRepresentation mapping : mappings) {
|
||||
ClientModel client = realm.findClient(mapping.getClient());
|
||||
if (client == null) {
|
||||
throw new RuntimeException("Unknown client specified in application scope mappings");
|
||||
}
|
||||
for (String roleString : mapping.getRoles()) {
|
||||
RoleModel role = applicationModel.getRole(roleString.trim());
|
||||
if (role == null) {
|
||||
|
||||
Reference in new issue
Block a user