Skip to content

Commit

Permalink
SAK-19072 - Removed description and provided string in the new role
Browse files Browse the repository at this point in the history
git-svn-id: https://source.sakaiproject.org/svn/authz/trunk@307030 66ffb92e-73f9-0310-93c1-f5514f145a0a
  • Loading branch information
jonespm committed Mar 12, 2014
1 parent 5105e45 commit 12540ca
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1190,11 +1190,22 @@ private boolean readRoleForm(RunData data, SessionState state)
// clear out the role
role.disallowAll();

String descriptionString = StringUtils.trimToNull(data.getParameters().getString("description"));
String providerOnlyString = StringUtils.trimToNull(data.getParameters().getString("providerOnly"));

//Role can't be null at this point
if (descriptionString == null) {
descriptionString = role.getDescription();
}

if (providerOnlyString == null) {
providerOnlyString = String.valueOf(role.isProviderOnly());
}

// description
role.setDescription(StringUtils.trimToNull(data.getParameters().getString("description")));
role.setDescription(StringUtils.trimToNull(descriptionString));

// providerOnly
String providerOnlyString = (StringUtils.trimToNull(data.getParameters().getString("providerOnly")));
role.setProviderOnly("true".equals(providerOnlyString));

// for each lock set, give it to the role
Expand Down

0 comments on commit 12540ca

Please sign in to comment.