mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Merge pull request 'Fix issues with retrieving visible roles' (#191) from prathabanKavin/device-mgt-core:visiblefix into master
Reviewed-on: https://repository.entgra.net/community/device-mgt-core/pulls/191
This commit is contained in:
commit
bfd260e6f9
@ -126,14 +126,14 @@ public class RoleManagementServiceImpl implements RoleManagementService {
|
||||
List<String> visibleRoles;
|
||||
RoleList visibleRoleList = new RoleList();
|
||||
try {
|
||||
String metaValue = "{\"isUserAbleToViewAllRoles\":false}";
|
||||
boolean decision = false;
|
||||
if(DeviceMgtAPIUtils.getMetadataManagementService().retrieveMetadata(metaKey) != null){
|
||||
metadata = DeviceMgtAPIUtils.getMetadataManagementService().retrieveMetadata(metaKey);
|
||||
metaValue = metadata.getMetaValue();
|
||||
String metaValue = metadata.getMetaValue();
|
||||
JSONParser parser = new JSONParser();
|
||||
JSONObject jsonObject = (JSONObject) parser.parse(metaValue);
|
||||
decision = (boolean) jsonObject.get(Constants.IS_USER_ABLE_TO_VIEW_ALL_ROLES);
|
||||
}
|
||||
JSONParser parser = new JSONParser();
|
||||
JSONObject jsonObject = (JSONObject) parser.parse(metaValue);
|
||||
boolean decision = (boolean) jsonObject.get(Constants.IS_USER_ABLE_TO_VIEW_ALL_ROLES);
|
||||
if (decision) {
|
||||
if (userStore == null || "".equals(userStore)){
|
||||
userStore = PRIMARY_USER_STORE;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user