revert-70aa11f8
kamidu 8 years ago
commit 6605a86bf7

@ -135,7 +135,7 @@ public class RoleManagementServiceImpl implements RoleManagementService {
final UserRealmProxy userRealmProxy = new UserRealmProxy(userRealmCore); final UserRealmProxy userRealmProxy = new UserRealmProxy(userRealmCore);
final UIPermissionNode rolePermissions = final UIPermissionNode rolePermissions =
userRealmProxy.getRolePermissions(roleName, MultitenantConstants.SUPER_TENANT_ID); userRealmProxy.getRolePermissions(roleName, MultitenantConstants.SUPER_TENANT_ID);
UIPermissionNode[] deviceMgtPermissions = new UIPermissionNode[2]; UIPermissionNode[] deviceMgtPermissions = new UIPermissionNode[4];
for (UIPermissionNode permissionNode : rolePermissions.getNodeList()) { for (UIPermissionNode permissionNode : rolePermissions.getNodeList()) {
if (permissionNode.getResourcePath().equals("/permission/admin")) { if (permissionNode.getResourcePath().equals("/permission/admin")) {
@ -144,6 +144,15 @@ public class RoleManagementServiceImpl implements RoleManagementService {
deviceMgtPermissions[0] = node; deviceMgtPermissions[0] = node;
} else if (node.getResourcePath().equals("/permission/admin/login")) { } else if (node.getResourcePath().equals("/permission/admin/login")) {
deviceMgtPermissions[1] = node; deviceMgtPermissions[1] = node;
} else if (node.getResourcePath().equals("/permission/admin/manage")) {
// Adding permissions related to app-store in emm-console
for (UIPermissionNode subNode : node.getNodeList()) {
if (subNode.getResourcePath().equals("/permission/admin/manage/mobileapp")) {
deviceMgtPermissions[2] = subNode;
} else if (subNode.getResourcePath().equals("/permission/admin/manage/webapp")) {
deviceMgtPermissions[3] = subNode;
}
}
} }
} }
} }

@ -337,10 +337,10 @@ public class RequestValidationUtil {
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage("Request parameter limit is a " + new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage("Request parameter limit is a " +
"negative value.").build()); "negative value.").build());
} }
if (limit - offset > 100) { if (limit > 100) {
throw new InputValidationException( throw new InputValidationException(
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage("Request results list should" + new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage("Request parameter limit should" +
" be less than or equal 100 values.").build()); " be less than or equal to 100.").build());
} }
} }

Loading…
Cancel
Save