Browse Source

fix(gui): show action button based on project user permission

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5885/head
Pranav C 1 year ago
parent
commit
11d60017de
  1. 8
      packages/nc-gui/pages/index/index/index.vue

8
packages/nc-gui/pages/index/index/index.vue

@ -249,7 +249,7 @@ const copyProjectMeta = async () => {
<div class="flex items-center">
<div @click.stop>
<a-menu class="!border-0 !m-0 !p-0" trigger-sub-menu-action="click">
<template v-if="isUIAllowed('projectTheme')">
<template v-if="isUIAllowed('projectTheme') || isUIAllowed('projectTheme', true, record.roles)">
<a-sub-menu key="theme" popup-class-name="custom-color">
<template #title>
<div
@ -308,7 +308,7 @@ const copyProjectMeta = async () => {
<div v-if="record.status !== ProjectStatus.JOB" class="flex items-center gap-2">
<component
:is="iconMap.edit"
v-if="isUIAllowed('projectUpdate', true)"
v-if="isUIAllowed('projectUpdate', true) || isUIAllowed('projectUpdate', true, record.roles)"
v-e="['c:project:edit:rename']"
class="nc-action-btn"
@click.stop="navigateTo(`/${text}`)"
@ -316,14 +316,14 @@ const copyProjectMeta = async () => {
<component
:is="iconMap.delete"
v-if="isUIAllowed('projectDelete', true)"
v-if="isUIAllowed('projectDelete', true) || isUIAllowed('projectDelete', true, record.roles)"
class="nc-action-btn"
:data-testid="`delete-project-${record.title}`"
@click.stop="deleteProject(record)"
/>
<a-dropdown
v-if="isUIAllowed('duplicateProject', true)"
v-if="isUIAllowed('duplicateProject', true) || isUIAllowed('duplicateProject', true, record.roles)"
:trigger="['click']"
overlay-class-name="nc-dropdown-import-menu"
@click.stop

Loading…
Cancel
Save