Skip to content

Commit

Permalink
LPS-83488 Inline usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
Preston-Crary committed Jul 16, 2018
1 parent cde7531 commit fc2babb
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,18 +172,20 @@ public void addModelResourcePermissions(
String[] ownerPermissions = ownerActionIds.toArray(
new String[ownerActionIds.size()]);

setOwnerResourcePermissions(
doUpdateResourcePermission(
companyId, name, ResourceConstants.SCOPE_INDIVIDUAL, primKey,
ownerRole.getRoleId(), userId, ownerPermissions);
userId, ownerRole.getRoleId(), ownerPermissions,
ResourcePermissionConstants.OPERATOR_SET, true);

if (modelPermissions != null) {
for (String roleName : modelPermissions.getRoleNames()) {
Role role = getRole(companyId, groupId, roleName);

setResourcePermissions(
doUpdateResourcePermission(
companyId, name, ResourceConstants.SCOPE_INDIVIDUAL,
primKey, role.getRoleId(),
modelPermissions.getActionIds(roleName));
primKey, 0, role.getRoleId(),
modelPermissions.getActionIds(roleName),
ResourcePermissionConstants.OPERATOR_SET, true);
}
}
}
Expand Down

0 comments on commit fc2babb

Please sign in to comment.