viewer can archive fix
Issue-ID: SDC-1351
Change-Id: I04d5c194e057707d150fafc885edac477e3b29d3
Signed-off-by: svishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>
diff --git a/openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPage.jsx b/openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPage.jsx
index 7f7af81..b61abea 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 @@
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 @@
onArchive={onArchive}
isArchived={isArchived}
onRestore={onRestore}
+ isCollaborator={isCollaborator}
/>
<PermissionsView
owner={owner}