Browse Source

chore(gui): lint

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3796/head
Pranav C 2 years ago
parent
commit
f74ea9c044
  1. 26
      packages/nc-gui/composables/useUIPermission/rolePermissions.ts
  2. 2
      packages/nc-gui/middleware/auth.global.ts
  3. 2
      packages/nc-gui/nuxt-shim.d.ts

26
packages/nc-gui/composables/useUIPermission/rolePermissions.ts

@ -12,15 +12,15 @@ const rolePermissions = {
projectCreate: true,
projectActions: true,
projectSettings: true,
}
},
},
// Project role permissions
[ProjectRole.Creator]: {
exclude: ["appStore"]
exclude: ['appStore'],
},
[ProjectRole.Owner]: {
exclude: ["appStore"]
exclude: ['appStore'],
},
[ProjectRole.Editor]: {
include: {
@ -40,22 +40,22 @@ const rolePermissions = {
apiDocs: true,
projectSettings: true,
newUser: false,
}
},
},
[ProjectRole.Commenter]: {
include: {
smartSheet: true,
column: true,
rowComments: true,
projectSettings: true,
},
smartSheet: true,
column: true,
rowComments: true,
projectSettings: true,
},
},
[ProjectRole.Viewer]: {
include: {
smartSheet: true,
column: true,
projectSettings: true,
},
smartSheet: true,
column: true,
projectSettings: true,
},
},
} as const

2
packages/nc-gui/middleware/auth.global.ts

@ -39,7 +39,7 @@ export default defineNuxtRouteMiddleware(async (to, from) => {
const { api } = useApi()
const {allRoles} = useRoles()
const { allRoles } = useRoles()
/** if user isn't signed in and google auth is enabled, try to check if sign-in data is present */
if (!state.signedIn && state.appInfo.value.googleAuthEnabled) await tryGoogleAuth()

2
packages/nc-gui/nuxt-shim.d.ts vendored

@ -1,6 +1,6 @@
import type { Api as BaseAPI } from 'nocodb-sdk'
import type { UseGlobalReturn } from './composables/useGlobal/types'
import type { NocoI18n, Roles } from './lib'
import type { NocoI18n } from './lib'
import type { TabType } from './composables'
declare module '#app/nuxt' {

Loading…
Cancel
Save