From 69a1b38fd0049815869d90812c464d8303d1e3e3 Mon Sep 17 00:00:00 2001
From: svishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>
Date: Mon, 21 May 2018 18:24:05 +0300
Subject: viewer can archive fix

Issue-ID: SDC-1351
Change-Id: I04d5c194e057707d150fafc885edac477e3b29d3
Signed-off-by: svishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>
---
 .../sdc-app/onboarding/versionsPage/VersionsPage.jsx   | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

(limited to 'openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPage.jsx')

diff --git a/openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPage.jsx b/openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPage.jsx
index 7f7af8130f..b61abea520 100644
--- a/openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPage.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPage.jsx
@@ -40,19 +40,22 @@ const VersionPageTitle = ({
     depricatedTitle,
     isArchived,
     onRestore,
-    onArchive
+    onArchive,
+    isCollaborator
 }) => {
     return (
         <div className="version-page-header">
             <div className="versions-page-title">{`${i18n(
                 'Available Versions'
             )} - ${itemName}  ${depricatedTitle}`}</div>
-            <FeatureDepricatedButton
-                depricateAction={
-                    isArchived ? () => onRestore() : () => onArchive()
-                }
-                title={i18n(isArchived ? 'RESTORE' : 'ARCHIVE')}
-            />
+            {isCollaborator && (
+                <FeatureDepricatedButton
+                    depricateAction={
+                        isArchived ? () => onRestore() : () => onArchive()
+                    }
+                    title={i18n(isArchived ? 'RESTORE' : 'ARCHIVE')}
+                />
+            )}
         </div>
     );
 };
@@ -91,6 +94,7 @@ class VersionsPage extends React.Component {
                     onArchive={onArchive}
                     isArchived={isArchived}
                     onRestore={onRestore}
+                    isCollaborator={isCollaborator}
                 />
                 <PermissionsView
                     owner={owner}
-- 
cgit 1.2.3-korg

