-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Update auth-and-access-control.md #9039
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Another little corrections based in my experience using Keystone. Regards!.
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 90a3301:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dagrinchi
| ```ts | ||
| const isAdmin = ({ session }: { session: Session }) => session?.data.isAdmin; | ||
| const isAdmin = ({ session }: { session: Session }) => Boolean(session?.data.isAdmin); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| const isAdmin = ({ session }: { session: Session }) => Boolean(session?.data.isAdmin); | |
| const isAdmin = ({ session }: { session?: Session }) => Boolean(session?.data.isAdmin); |
|
|
||
| ```ts | ||
| const isAdmin = ({ session }: { session: Session }) => session?.data.isAdmin; | ||
| const isAdmin = ({ session }: { session: Session }) => Boolean(session?.data.isAdmin); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| const isAdmin = ({ session }: { session: Session }) => Boolean(session?.data.isAdmin); | |
| const isAdmin = ({ session }: { session?: Session }) => Boolean(session?.data.isAdmin); |
| !!session?.data.id; | ||
| // Validate the current user is an Admin | ||
| const isAdmin = ({ session }: { session: Session }) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| const isAdmin = ({ session }: { session: Session }) => | |
| const isAdmin = ({ session }: { session?: Session }) => |
|
Oh, I shouldn't have merged this until we added the |
Another little corrections based in my experience using Keystone. Regards!.