mirror of
https://github.com/nocodb/nocodb.git
synced 2026-02-01 22:08:33 +00:00
set is_api_token to context correctly also fix the typescript definition of nccontext
This commit is contained in:
@@ -19,6 +19,10 @@ export interface NcContext {
|
||||
suppressDependencyEvaluation?: boolean;
|
||||
additionalContext?: Record<string, any>;
|
||||
schema_locked?: boolean;
|
||||
cache?: boolean;
|
||||
cacheMap?: any;
|
||||
permissions?: any;
|
||||
is_api_token?: boolean;
|
||||
}
|
||||
|
||||
export interface NcRequest extends Partial<Request> {
|
||||
|
||||
@@ -1113,6 +1113,10 @@ export class AclMiddleware implements NestInterceptor {
|
||||
NcError.sourceDataReadOnly(source.alias);
|
||||
}
|
||||
}
|
||||
|
||||
if (req.context) {
|
||||
req.context.is_api_token = req.user.is_api_token;
|
||||
}
|
||||
}
|
||||
|
||||
async intercept(
|
||||
|
||||
Reference in New Issue
Block a user