Skip to content

Commit

Permalink
fix for assignments limit
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Aug 20, 2018
1 parent 3e9d35e commit 164d0c2
Showing 1 changed file with 5 additions and 4 deletions.
Expand Up @@ -394,11 +394,12 @@ public static boolean isShoppingCartAssignmentsLimitReached(int assignmentsLimit
public static int loadAssignmentsLimit(OperationResult result, PageBase pageBase){
int assignmentsLimit = -1;
try {
SystemConfigurationType sysConfig = pageBase.getModelInteractionService().getSystemConfiguration(result);
if (sysConfig != null && sysConfig.getAdminGuiConfiguration() != null && sysConfig.getAdminGuiConfiguration().getRoleManagement() != null){
assignmentsLimit = sysConfig.getAdminGuiConfiguration().getRoleManagement().getAssignmentApprovalRequestLimit();
AdminGuiConfigurationType adminGuiConfig = pageBase.getModelInteractionService().getAdminGuiConfiguration(
pageBase.createSimpleTask(result.getOperation()), result);
if (adminGuiConfig != null && adminGuiConfig.getRoleManagement() != null) {
assignmentsLimit = adminGuiConfig.getRoleManagement().getAssignmentApprovalRequestLimit();
}
} catch (ObjectNotFoundException | SchemaException ex){
} catch (ObjectNotFoundException | SchemaException ex) {
LOGGER.error("Error getting system configuration: {}", ex.getMessage(), ex);
}
return assignmentsLimit;
Expand Down

0 comments on commit 164d0c2

Please sign in to comment.