Merge branch 'application-mgt-new' of https://gitlab.com/tcdlpds/carbon-device-mgt into application-mgt-new

feature/appm-store/pbac
Jayasanka 6 years ago
commit c3689010dd

@ -1493,7 +1493,11 @@ public class ApplicationManagerImpl implements ApplicationManager {
List<String> appUnrestrictedRoles = this.visibilityDAO.getUnrestrictedRoles(applicationId, tenantId); List<String> appUnrestrictedRoles = this.visibilityDAO.getUnrestrictedRoles(applicationId, tenantId);
boolean isExistingAppRestricted = !appUnrestrictedRoles.isEmpty(); boolean isExistingAppRestricted = !appUnrestrictedRoles.isEmpty();
boolean isUpdatingAppRestricted = !applicationUpdateWrapper.getUnrestrictedRoles().isEmpty(); boolean isUpdatingAppRestricted = false;
if (applicationUpdateWrapper.getUnrestrictedRoles() != null && !applicationUpdateWrapper
.getUnrestrictedRoles().isEmpty()) {
isUpdatingAppRestricted = true;
}
if (isExistingAppRestricted && !isUpdatingAppRestricted) { if (isExistingAppRestricted && !isUpdatingAppRestricted) {
visibilityDAO.deleteUnrestrictedRoles(appUnrestrictedRoles, applicationId, tenantId); visibilityDAO.deleteUnrestrictedRoles(appUnrestrictedRoles, applicationId, tenantId);

Loading…
Cancel
Save