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

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

@ -39,7 +39,7 @@ export default defineNuxtRouteMiddleware(async (to, from) => {
const { api } = useApi() 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 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() 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 { Api as BaseAPI } from 'nocodb-sdk'
import type { UseGlobalReturn } from './composables/useGlobal/types' import type { UseGlobalReturn } from './composables/useGlobal/types'
import type { NocoI18n, Roles } from './lib' import type { NocoI18n } from './lib'
import type { TabType } from './composables' import type { TabType } from './composables'
declare module '#app/nuxt' { declare module '#app/nuxt' {

Loading…
Cancel
Save