Browse Source

fix: disable api docs access for viewer role

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/2252/head
Raju Udava 3 years ago
parent
commit
045ed0024a
  1. 22
      packages/nc-gui/components/ProjectTreeView.vue
  2. 3
      packages/nc-gui/helpers/rolePermissionsEE.js

22
packages/nc-gui/components/ProjectTreeView.vue

@ -681,16 +681,18 @@
</div> </div>
<v-divider /> <v-divider />
<div <template v-if="_isUIAllowed('apiDocs')">
v-t="['e:api-docs']" <div
class="caption pointer nc-docs pb-2 pl-5 pr-3 pt-2 d-flex align-center" v-t="['e:api-docs']"
@click="openLink(apiLink)" class="caption pointer nc-docs pb-2 pl-5 pr-3 pt-2 d-flex align-center"
> @click="openLink(apiLink)"
<v-icon color="brown" small class="mr-2"> >
mdi-open-in-new <v-icon color="brown" small class="mr-2">
</v-icon> mdi-open-in-new
{{ $t('title.apiDocs') }} </v-icon>
</div> {{ $t('title.apiDocs') }}
</div>
</template>
<template v-if="_isUIAllowed('settings')"> <template v-if="_isUIAllowed('settings')">
<div class="pl-5 pr-3 d-flex align-center pb-2"> <div class="pl-5 pr-3 d-flex align-center pb-2">

3
packages/nc-gui/helpers/rolePermissionsEE.js

@ -14,7 +14,8 @@ export default {
fieldsSync: true, fieldsSync: true,
gridColUpdate: true, gridColUpdate: true,
filterSync: true, filterSync: true,
csvImport: true csvImport: true,
apiDocs: true
}, },
commenter: { commenter: {
smartSheet: true, smartSheet: true,

Loading…
Cancel
Save