Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed location of map-groups-to-roles attribute for AddSecurityRealm offline command #77

Merged
merged 1 commit into from
Feb 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ public Builder plainText(Boolean plainText) {
@Override
public AddPropertiesAuthentication build() {
if (path == null) {
throw new IllegalArgumentException("Path of the security domain must be specified as non null value");
throw new IllegalArgumentException("Path of the property file must be specified as non null value");
}
if (path.isEmpty()) {
throw new IllegalArgumentException("Path of the security domain must not be empty value");
throw new IllegalArgumentException("Path of the property file must not be empty value");
}
return new AddPropertiesAuthentication(this);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
realmAttrs = ['name': atrSecurityRealmName]
if (atrMapGroupsToRoles != null) realmAttrs['map-groups-to-roles'] = atrMapGroupsToRoles

def realmDefinition = {
'security-realm'(realmAttrs)
'security-realm'(realmAttrs) {
if (atrMapGroupsToRoles != null) {
'authorization'(['map-groups-to-roles': atrMapGroupsToRoles])
}
}
}

def existingSecurityRealm = management.'security-realms'.'security-realm'.find { it.'@name' == atrSecurityRealmName }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ public class AddSecurityRealmOfflineTest {
+ "<server xmlns=\"urn:jboss:domain:1.7\">\n"
+ " <management>\n"
+ " <security-realms>\n"
+ " <security-realm name=\"creaperSecRealm\" map-groups-to-roles=\"true\"/>\n"
+ " <security-realm name=\"creaperSecRealm\">\n"
+ " <authorization map-groups-to-roles=\"true\"/>"
+ " </security-realm>\n"
+ " </security-realms>\n"
+ " </management>\n"
+ "</server>";
Expand Down