Skip to content

Commit d952332

Browse files
committed
feat(auth): merge rename user to authUser to master
2 parents e9ce8fa + c99f890 commit d952332

File tree

7 files changed

+180
-150
lines changed

7 files changed

+180
-150
lines changed

examples/typescript/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export default tensei()
2323
.root(__dirname)
2424
.resources([
2525
resource('Post')
26+
.canInsert(({ authUser }) => false)
2627
.fields([
2728
text('Title').rules('required'),
2829
slug('Slug')

packages/auth/auth.config.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { GraphQLPluginContext, DataPayload } from '@tensei/common'
44
declare module '@tensei/common' {
55
interface GraphQLPluginContext {
66
// @ts-ignore
7-
user: import('@tensei/orm').UserModel & DataPayload
7+
authUser: import('@tensei/orm').UserModel & DataPayload
88
// @ts-ignore
99
team: import('@tensei/orm').TeamModel
1010
}

packages/auth/auth.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ declare global {
88
namespace Express {
99
export interface Request {
1010
// @ts-ignore
11-
user: import('@tensei/orm').UserModel & DataPayload
11+
authUser: import('@tensei/orm').UserModel & DataPayload
1212
// @ts-ignore
1313
team: import('@tensei/orm').TeamModel
1414
verifyTwoFactorAuthToken: (token: string | number) => boolean

0 commit comments

Comments
 (0)