aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib
diff options
context:
space:
mode:
authorsvishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>2018-01-15 15:55:53 +0200
committersvishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>2018-01-15 15:56:03 +0200
commita3e9c9ecebcf5ab4dc83ee06126b5e6883b637e6 (patch)
treeb8fc8944307c339ec6b5e0fb635bc0996e1e7267 /openecomp-be/lib
parentd1bb2e5be03dba561ae3aa13041c3a46396a1581 (diff)
Contributor can also submit fix
Issue-ID: SDC-931 Change-Id: Ic2f67552614e8236b3e19a6a205b699e36947968 Signed-off-by: svishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>
Diffstat (limited to 'openecomp-be/lib')
-rw-r--r--openecomp-be/lib/openecomp-item-permissions-lib/openecomp-item-permissions-impl/src/main/java/org/openecomp/sdc/itempermissions/impl/PermissionsRulesImpl.java3
-rw-r--r--openecomp-be/lib/openecomp-item-permissions-lib/openecomp-item-permissions-impl/src/test/java/org/openecomp/sdc/itempermissions/impl/PermissionsRulesImplTest.java2
2 files changed, 3 insertions, 2 deletions
diff --git a/openecomp-be/lib/openecomp-item-permissions-lib/openecomp-item-permissions-impl/src/main/java/org/openecomp/sdc/itempermissions/impl/PermissionsRulesImpl.java b/openecomp-be/lib/openecomp-item-permissions-lib/openecomp-item-permissions-impl/src/main/java/org/openecomp/sdc/itempermissions/impl/PermissionsRulesImpl.java
index 22d81a73dc..1f56c1038a 100644
--- a/openecomp-be/lib/openecomp-item-permissions-lib/openecomp-item-permissions-impl/src/main/java/org/openecomp/sdc/itempermissions/impl/PermissionsRulesImpl.java
+++ b/openecomp-be/lib/openecomp-item-permissions-lib/openecomp-item-permissions-impl/src/main/java/org/openecomp/sdc/itempermissions/impl/PermissionsRulesImpl.java
@@ -56,7 +56,8 @@ public class PermissionsRulesImpl implements PermissionsRules {
break;
case Submit_Item:
- if (permission.equals(PermissionTypes.Owner.name())) {
+ if (permission.equals(PermissionTypes.Contributor.name()) || permission.equals
+ (PermissionTypes.Owner.name())) {
return true;
}
break;
diff --git a/openecomp-be/lib/openecomp-item-permissions-lib/openecomp-item-permissions-impl/src/test/java/org/openecomp/sdc/itempermissions/impl/PermissionsRulesImplTest.java b/openecomp-be/lib/openecomp-item-permissions-lib/openecomp-item-permissions-impl/src/test/java/org/openecomp/sdc/itempermissions/impl/PermissionsRulesImplTest.java
index 635a0b2a25..c2a193103a 100644
--- a/openecomp-be/lib/openecomp-item-permissions-lib/openecomp-item-permissions-impl/src/test/java/org/openecomp/sdc/itempermissions/impl/PermissionsRulesImplTest.java
+++ b/openecomp-be/lib/openecomp-item-permissions-lib/openecomp-item-permissions-impl/src/test/java/org/openecomp/sdc/itempermissions/impl/PermissionsRulesImplTest.java
@@ -61,7 +61,7 @@ public class PermissionsRulesImplTest {
@Test
public void testIsAllowedCaseSubmitNotOwner(){
- Assert.assertFalse(permissionsRules.isAllowed(PERMISSION_CONTRIBUTOR,SUBMIT_ACTION));
+ Assert.assertTrue(permissionsRules.isAllowed(PERMISSION_CONTRIBUTOR,SUBMIT_ACTION));
}
@Test