aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/backend/openecomp-sdc-item-permissions-manager
diff options
context:
space:
mode:
authortalig <talig@amdocs.com>2018-05-23 11:38:51 +0300
committerAvi Gaffa <avi.gaffa@amdocs.com>2018-05-23 09:09:03 +0000
commit66b0d09b07a0d16daacbb4c08da8cfe7e55bc28b (patch)
treef94de8fab9b97733fcc1a70fbf4fd4ba5eb008fc /openecomp-be/backend/openecomp-sdc-item-permissions-manager
parent134783cf629d515f35df39d1e0a583ecf8ffdc56 (diff)
Fix bug in change item owner
Change-Id: I200387d41f95d61ad0f6be6663b8d8fac198aa90 Issue-ID: SDC-1355 Signed-off-by: talig <talig@amdocs.com>
Diffstat (limited to 'openecomp-be/backend/openecomp-sdc-item-permissions-manager')
-rw-r--r--openecomp-be/backend/openecomp-sdc-item-permissions-manager/src/main/java/org/openecomp/sdc/itempermissions/PermissionsManager.java5
-rw-r--r--openecomp-be/backend/openecomp-sdc-item-permissions-manager/src/main/java/org/openecomp/sdc/itempermissions/dao/impl/PermissionsManagerImpl.java5
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