From 66b0d09b07a0d16daacbb4c08da8cfe7e55bc28b Mon Sep 17 00:00:00 2001 From: talig Date: Wed, 23 May 2018 11:38:51 +0300 Subject: Fix bug in change item owner Change-Id: I200387d41f95d61ad0f6be6663b8d8fac198aa90 Issue-ID: SDC-1355 Signed-off-by: talig --- .../java/org/openecomp/sdc/itempermissions/PermissionsManager.java | 5 +++-- .../sdc/itempermissions/dao/impl/PermissionsManagerImpl.java | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'openecomp-be/backend/openecomp-sdc-item-permissions-manager/src/main') 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 addedUsersIds, Set removedUsersIds); - boolean isAllowed(String itemId,String userId,String action); + boolean isAllowed(String itemId, String userId, String action); - String getUserItemPermission(String itemId, String userId); + Optional 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 getUserItemPermission(String itemId, String userId) { + return permissionsServices.getUserItemPermission(itemId, userId); } @Override -- cgit 1.2.3-korg