diff options
Diffstat (limited to 'openecomp-be/backend/openecomp-sdc-item-permissions-manager/src')
2 files changed, 6 insertions, 4 deletions
diff --git a/openecomp-be/backend/openecomp-sdc-item-permissions-manager/src/main/java/org/openecomp/sdc/itempermissions/PermissionsManager.java b/openecomp-be/backend/openecomp-sdc-item-permissions-manager/src/main/java/org/openecomp/sdc/itempermissions/PermissionsManager.java index 09f6048f82..a7e8ca549d 100644 --- a/openecomp-be/backend/openecomp-sdc-item-permissions-manager/src/main/java/org/openecomp/sdc/itempermissions/PermissionsManager.java +++ b/openecomp-be/backend/openecomp-sdc-item-permissions-manager/src/main/java/org/openecomp/sdc/itempermissions/PermissionsManager.java @@ -18,6 +18,7 @@ package org.openecomp.sdc.itempermissions; import org.openecomp.sdc.itempermissions.type.ItemPermissionsEntity; import java.util.Collection; +import java.util.Optional; import java.util.Set; /** @@ -32,9 +33,9 @@ public interface PermissionsManager { void updateItemPermissions(String itemId, String permission, Set<String> addedUsersIds, Set<String> removedUsersIds); - boolean isAllowed(String itemId,String userId,String action); + boolean isAllowed(String itemId, String userId, String action); - String getUserItemPermission(String itemId, String userId); + Optional<String> getUserItemPermission(String itemId, String userId); void deleteItemPermissions(String itemId); diff --git a/openecomp-be/backend/openecomp-sdc-item-permissions-manager/src/main/java/org/openecomp/sdc/itempermissions/dao/impl/PermissionsManagerImpl.java b/openecomp-be/backend/openecomp-sdc-item-permissions-manager/src/main/java/org/openecomp/sdc/itempermissions/dao/impl/PermissionsManagerImpl.java index 741053017c..4402af6599 100644 --- a/openecomp-be/backend/openecomp-sdc-item-permissions-manager/src/main/java/org/openecomp/sdc/itempermissions/dao/impl/PermissionsManagerImpl.java +++ b/openecomp-be/backend/openecomp-sdc-item-permissions-manager/src/main/java/org/openecomp/sdc/itempermissions/dao/impl/PermissionsManagerImpl.java @@ -26,6 +26,7 @@ import static org.openecomp.sdc.itempermissions.notifications.NotificationConsta import java.util.Collection; import java.util.HashMap; import java.util.Map; +import java.util.Optional; import java.util.Set; import org.openecomp.sdc.common.errors.CoreException; import org.openecomp.sdc.common.errors.ErrorCategory; @@ -150,8 +151,8 @@ public class PermissionsManagerImpl implements PermissionsManager { } @Override - public String getUserItemPermission(String itemId, String userId) { - return permissionsServices.getUserItemPermiission(itemId, userId); + public Optional<String> getUserItemPermission(String itemId, String userId) { + return permissionsServices.getUserItemPermission(itemId, userId); } @Override |