From a3e9c9ecebcf5ab4dc83ee06126b5e6883b637e6 Mon Sep 17 00:00:00 2001 From: svishnev Date: Mon, 15 Jan 2018 15:55:53 +0200 Subject: Contributor can also submit fix Issue-ID: SDC-931 Change-Id: Ic2f67552614e8236b3e19a6a205b699e36947968 Signed-off-by: svishnev --- .../org/openecomp/sdc/itempermissions/impl/PermissionsRulesImpl.java | 3 ++- .../openecomp/sdc/itempermissions/impl/PermissionsRulesImplTest.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'openecomp-be') 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 -- cgit 1.2.3-korg