refactor(auth): rename SuperAdmin to Superuser#434
Merged
Conversation
9256bf4 to
424c8ed
Compare
Rename the SuperAdmin role to Superuser across the entire codebase. Only the Superuser role is now protected from removal/deletion - Admin role holders can be freely managed. Seed only a single Superuser in development.
8b4a953 to
9cf131d
Compare
…rden init script - Rename LastAdminCannotDelete to LastSuperuserCannotDelete - Rename EnforceLastAdminProtection* to EnforceLastSuperuserProtection* - Rename superAdminRole variable to superuserRole - Add DeleteUser_LastSuperuser_ReturnsFailure test - Use silent password prompt (read -sp) in init.sh - Escape sed-special chars in password substitution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SuperAdminrole toSuperuseracross backend, frontend, tests, docs, and skillsinit.sh/init.ps1(--email,--passwordflags) instead of hardcoded defaultsBreaking Changes
SuperAdminrole renamed toSuperuser- existing databases with seededSuperAdminrole will need the role name updated manually (or re-seed)appsettings.Development.jsonseed section now uses{INIT_SUPERUSER_EMAIL}/{INIT_SUPERUSER_PASSWORD}placeholders - requires running init scriptTest Plan
dotnet build && dotnet test -c Release(1,041 tests pass)pnpm run test && pnpm run check--yesflag uses defaults (admin@localhost/Admin123!)