Skip to content

fix: restrict admin route access for normal user#43

Merged
es3n1n merged 2 commits intomainfrom
fix/admin-access-control
Oct 30, 2025
Merged

fix: restrict admin route access for normal user#43
es3n1n merged 2 commits intomainfrom
fix/admin-access-control

Conversation

@meumar-osec
Copy link
Copy Markdown
Collaborator

  • Add perms to login, register, and verify responses & for new users it's 0
  • Store user permissions in localStorage & add client side permission utility for admin route protection
  • Server side permission checks remain the primary security

@meumar-osec meumar-osec force-pushed the fix/admin-access-control branch from e9dc370 to c983f83 Compare October 29, 2025 09:41
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Oct 29, 2025

Deploying rctf with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7575129
Status: ✅  Deploy successful!
Preview URL: https://e0925651.rctf.pages.dev
Branch Preview URL: https://fix-admin-access-control.rctf.pages.dev

View logs

@jktrn jktrn added this to rCTF Oct 29, 2025
@jktrn jktrn moved this to in-progress in rCTF Oct 29, 2025
@jktrn jktrn added this to the v1 milestone Oct 29, 2025
@jktrn jktrn changed the title Restrict admin route access for normal user fix: restrict admin route access for normal user Oct 29, 2025
Copy link
Copy Markdown
Collaborator

@es3n1n es3n1n left a comment

Choose a reason for hiding this comment

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

It would probably make more sense to also return perms in goodUserSelfData and sync the stored permissions with it every time we request /me

Comment thread packages/client/src/app.js Outdated
@es3n1n es3n1n merged commit 197c2ac into main Oct 30, 2025
6 checks passed
@github-project-automation github-project-automation Bot moved this from in-progress to done in rCTF Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: done

Development

Successfully merging this pull request may close these issues.

3 participants