Skip to content
This repository was archived by the owner on Feb 9, 2026. It is now read-only.

refactor(auth): removed admin role from registration flow.#536

Merged
CotSezer merged 1 commit into
devfrom
feat/535-remove-admin-role-from-user-registration
Dec 16, 2025
Merged

refactor(auth): removed admin role from registration flow.#536
CotSezer merged 1 commit into
devfrom
feat/535-remove-admin-role-from-user-registration

Conversation

@CotSezer

Copy link
Copy Markdown
Contributor

This PR refactors the authentication registration flow to remove assignment of the admin role during user registration. Role elevation is no longer possible at signup.

What changed

  • Removed admin role handling from the registration logic
  • Cleaned up related conditionals and validations in the auth flow

Why

  • Prevents accidental or unauthorized privilege escalation
  • Aligns registration with principle of least privilege

Impact / Notes

  • No change to existing users or roles
  • Admin roles must now be assigned through approved post-registration mechanisms (e.g., internal tooling or migrations)

Testing

  • Confirmed admin role cannot be set via registration payload

Closes #271

@CotSezer CotSezer added this to the Milestone 3: Final Milestone milestone Dec 16, 2025
@CotSezer CotSezer requested a review from enverern December 16, 2025 01:24
@CotSezer CotSezer self-assigned this Dec 16, 2025
@CotSezer CotSezer added domain: backend Back-end related items type: improvement / refactor an improvement or structural change to existing code priority: urgent Something should be done immediately labels Dec 16, 2025

@enverern enverern left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It is done. Thank you.

@CotSezer CotSezer merged commit c903f15 into dev Dec 16, 2025
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

domain: backend Back-end related items priority: urgent Something should be done immediately type: improvement / refactor an improvement or structural change to existing code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants