mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fix for visible role issue
This commit is contained in:
parent
1921b3e54d
commit
20906122db
@ -126,8 +126,11 @@ public class RoleManagementServiceImpl implements RoleManagementService {
|
|||||||
List<String> visibleRoles;
|
List<String> visibleRoles;
|
||||||
RoleList visibleRoleList = new RoleList();
|
RoleList visibleRoleList = new RoleList();
|
||||||
try {
|
try {
|
||||||
metadata = DeviceMgtAPIUtils.getMetadataManagementService().retrieveMetadata(metaKey);
|
String metaValue = "{\"isUserAbleToViewAllRoles\":false}";
|
||||||
String metaValue = metadata.getMetaValue();
|
if(DeviceMgtAPIUtils.getMetadataManagementService().retrieveMetadata(metaKey) != null){
|
||||||
|
metadata = DeviceMgtAPIUtils.getMetadataManagementService().retrieveMetadata(metaKey);
|
||||||
|
metaValue = metadata.getMetaValue();
|
||||||
|
}
|
||||||
JSONParser parser = new JSONParser();
|
JSONParser parser = new JSONParser();
|
||||||
JSONObject jsonObject = (JSONObject) parser.parse(metaValue);
|
JSONObject jsonObject = (JSONObject) parser.parse(metaValue);
|
||||||
boolean decision = (boolean) jsonObject.get(Constants.IS_USER_ABLE_TO_VIEW_ALL_ROLES);
|
boolean decision = (boolean) jsonObject.get(Constants.IS_USER_ABLE_TO_VIEW_ALL_ROLES);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user