bugfix
This commit is contained in:
@@ -18,7 +18,10 @@ export type GetUserServerRole = (params: {
|
||||
userId: string
|
||||
}) => Promise<Optional<ServerRoles>>
|
||||
|
||||
export type ValidateScopes = (scopes: Optional<string[]>, scope: string) => void
|
||||
export type ValidateScopes = (
|
||||
scopes: Optional<string[]>,
|
||||
scope: string
|
||||
) => Promise<void>
|
||||
|
||||
export type AuthorizeResolver = (
|
||||
userId: MaybeNullOrUndefined<string>,
|
||||
|
||||
@@ -18,7 +18,7 @@ import { Roles } from '@speckle/shared'
|
||||
/**
|
||||
* Validates the scope against a list of scopes of the current session.
|
||||
*/
|
||||
export const validateScopesFactory = (): ValidateScopes => (scopes, scope) => {
|
||||
export const validateScopesFactory = (): ValidateScopes => async (scopes, scope) => {
|
||||
const errMsg = `Your auth token does not have the required scope${
|
||||
scope?.length ? ': ' + scope + '.' : '.'
|
||||
}`
|
||||
|
||||
Reference in New Issue
Block a user