Seed Identity Roles for development#18
Merged
JoeProgrammer88 merged 2 commits intomainfrom Oct 4, 2025
Merged
Conversation
Enhanced ASP.NET Identity configuration to include role support
by adding `.AddRoles<IdentityRole>()` in `Program.cs`. Introduced
a `SeedData` class to seed predefined roles ("Instructor" and
"Student") and a default instructor user during application
startup in the development environment.
Added a section to the `README.md` detailing how to log in as an instructor in the development environment, including default credentials and a note about the seeded account. Updated the `SpeakingInBitsWeb.slnx` file to include the `README.md` under a new `/Solution Items/` folder.
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.
Closes #11
Closes #4
This pull request introduces initial support for role-based identity and seeding of a default instructor user in the development environment. It adds a
SeedDatautility for database seeding, updates the application startup to seed roles and a default user in development, and improves documentation for developers.Role-based identity and user seeding:
SeedDataclass inSpeakingInBitsWeb/Models/SeedData.csthat seeds default roles ("Instructor", "Student") and a default instructor user with usernameDefaultInstructorand passwordProgramming01#in development.SpeakingInBitsWeb/Program.csto add role support to ASP.NET Identity and to call the seeding methods during application startup in development builds. [1] [2]Developer documentation and solution structure:
README.mdwith instructions for logging in as the default instructor in development and noted the credentials are seeded via/Models/SeedData.cs.README.mdas a solution item inSpeakingInBitsWeb.slnxfor easier access from the solution explorer.