scope-role-permission refactoring and webapp authorization

kernel-4.6.x
Amalka Subasinghe 4 years ago
parent 94dd33ffa5
commit 30a1d92fde

@ -274,16 +274,9 @@ public class DeviceManagementConfigServiceImpl implements DeviceManagementConfig
@Path("/permissions") @Path("/permissions")
@Produces({MediaType.APPLICATION_JSON}) @Produces({MediaType.APPLICATION_JSON})
public Response addPermission(List<String> permissions) { public Response addPermission(List<String> permissions) {
// PermissionManagerService permissionService = DeviceMgtAPIUtils.getPermissionManagerService();
// org.wso2.carbon.device.mgt.common.permission.mgt.Permission permission = new org
// .wso2.carbon.device.mgt.common.permission.mgt.Permission();
for (String path : permissions) { for (String path : permissions) {
// permission.setPath(path);
// permission.setUrl(path);
try { try {
PermissionUtils.putPermission(path); PermissionUtils.putPermission(path);
// permissionService.addPermission(permission);
} catch (PermissionManagementException e) { } catch (PermissionManagementException e) {
String msg = "Error occurred adding permission"; String msg = "Error occurred adding permission";
log.error(msg, e); log.error(msg, e);

Loading…
Cancel
Save