Browse Source

fix(nc-gui): show audit logs tab only if user has permission

pull/8836/head
Ramesh Mane 5 months ago
parent
commit
58b2551be6
  1. 2
      packages/nc-gui/components/workspace/AuditLogs.vue
  2. 22
      packages/nc-gui/components/workspace/View.vue

2
packages/nc-gui/components/workspace/AuditLogs.vue

@ -701,7 +701,7 @@ onMounted(async () => {
class="relative"
:class="{
'h-[calc(100%_-_92px)] ': baseId,
'h-[calc(100%_-_134px)]': !baseId,
'h-[calc(100%_-_140px)]': !baseId,
}"
>
<div class="table-wrapper max-h-[calc(100%_-_40px)] overflow-auto nc-scrollbar-thin relative">

22
packages/nc-gui/components/workspace/View.vue

@ -121,17 +121,19 @@ onMounted(() => {
</a-tab-pane>
</template>
<a-tab-pane key="audit" class="w-full">
<template #tab>
<div class="flex flex-row items-center px-2 pb-1 gap-x-1.5">
<GeneralIcon icon="audit" class="!h-3.5 !w-3.5" />
Audit Logs
<template v-if="isUIAllowed('workspaceAuditList')">
<a-tab-pane key="audit" class="w-full">
<template #tab>
<div class="flex flex-row items-center px-2 pb-1 gap-x-1.5">
<GeneralIcon icon="audit" class="!h-3.5 !w-3.5" />
Audit Logs
</div>
</template>
<div class="h-[calc(100vh-120px)]">
<WorkspaceAuditLogs :workspace-id="currentWorkspace.id" />
</div>
</template>
<div class="h-[calc(100vh-120px)]">
<WorkspaceAuditLogs :workspace-id="currentWorkspace.id" />
</div>
</a-tab-pane>
</a-tab-pane>
</template>
</NcTabs>
</div>
</template>

Loading…
Cancel
Save