Skip to content
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

fix: permissions for shop #1073

Merged
merged 6 commits into from
Aug 17, 2024
Merged

fix: permissions for shop #1073

merged 6 commits into from
Aug 17, 2024

Conversation

niekcandaele
Copy link
Collaborator

No description provided.


export const Route = createFileRoute('/_auth/gameserver/$gameServerId')({
beforeLoad: async ({ context }) => {
const session = await context.auth.getSession();
if (!hasPermission(session, ['READ_GAMESERVERS'])) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not that it matters really, but the hasPermission is typed based on PERMISSIONS from @takaro/apiclient, so it's not really needed to import

Copy link
Collaborator

@emielvanseveren emielvanseveren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so the READ_GAMESERVERS PERMISSION does not exist anymore or has no purpose?

@niekcandaele
Copy link
Collaborator Author

so the READ_GAMESERVERS PERMISSION does not exist anymore or has no purpose?

No, is deleted as we discussed. Every user can now read basic info about gameservers inside a domain

@emielvanseveren
Copy link
Collaborator

can we merge this?

@niekcandaele niekcandaele changed the base branch from main to development August 17, 2024 09:04
@niekcandaele niekcandaele added the bug Something isn't working label Aug 17, 2024
@niekcandaele niekcandaele added this pull request to the merge queue Aug 17, 2024
Merged via the queue into development with commit 3968c37 Aug 17, 2024
10 checks passed
@niekcandaele niekcandaele deleted the shop-permissions-fixes branch August 17, 2024 13:48
@niekcandaele niekcandaele mentioned this pull request Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants