-
Notifications
You must be signed in to change notification settings - Fork 0
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
New user role entity #20
Conversation
…ict production deployment to main branch
…just column types, and enhance validation attributes
…amp and Rating attributes
… default values and update nullability for Movie property in edit model
…ty: update login process to store user role, modify movie index page to show actions based on role, and create add to favorites page and logic
Copilot
AI
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 20 out of 35 changed files in this pull request and generated 3 suggestions.
Files not reviewed (15)
- Migrations/20240613200303_InitialCreate.Designer.cs: Language not supported
- Migrations/20240623214222_Rating.Designer.cs: Language not supported
- Migrations/20240623215214_RatingTwo.Designer.cs: Language not supported
- Migrations/20241112044546_InitialCreate.Designer.cs: Language not supported
- Pages/Account/Login.cshtml: Evaluated as low risk
- Migrations/20240613200303_InitialCreate.cs: Evaluated as low risk
- Migrations/RazorPagesMovieContextModelSnapshot.cs: Evaluated as low risk
- Migrations/20240623215214_RatingTwo.cs: Evaluated as low risk
- Migrations/20240623214222_Rating.cs: Evaluated as low risk
- Pages/Account/Logout.cshtml: Evaluated as low risk
- Models/SeedData.cs: Evaluated as low risk
- .github/workflows/ci.yml: Evaluated as low risk
- .github/workflows/cd.yml: Evaluated as low risk
- Data/RazorPagesMovieContext.cs: Evaluated as low risk
- Migrations/20241112044546_InitialCreate.cs: Evaluated as low risk
Tip: Leave feedback on Copilot's review comments with the 👎 and 👍 buttons to help improve review quality. Learn more
Pages/Account/Login.cshtml.cs
Outdated
var role = user.Role.ToString(); | ||
|
||
// Log user role to console | ||
Console.WriteLine($"User {user.Username} logged in at {DateTime.UtcNow} with role: {role}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using Console.WriteLine for logging is not recommended in production code. Use the logger instead.
Console.WriteLine($"User {user.Username} logged in at {DateTime.UtcNow} with role: {role}"); |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
Models/Movie.cs
Outdated
// </snippet1> | ||
#endif | ||
[Timestamp] | ||
public byte[] Timestamp { get; set; } = new byte[8]; // Initialize with a default value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Timestamp property should not be initialized with a default value in the model. This should be handled by the database.
public byte[] Timestamp { get; set; } = new byte[8]; // Initialize with a default value | |
[Timestamp] | |
public byte[] Timestamp { get; set; } |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
Co-authored-by: Copilot <[email protected]>
…d add UI test framework setup
…dling and update .gitignore to exclude .err and .out files
…djust dependencies for QA environment provisioning
…abase connection in CD pipeline
…ests and update CI workflow to support multiple test users
… setup for macOS and Windows to streamline test user configuration
…S and Windows to randomize test user credentials
…nd Windows to define specific test user credentials
…for macOS and Windows to allow server to receive requests
…iable setup for macOS and Windows to optimize request handling
…setup for Windows to ensure server readiness for requests
…improve clarity in job naming
…stinct environment variable setups
…nclude both macOS and Windows UI tests
…s to ensure proper sequencing
…ingle job and remove redundant environment variable setup
This pull request introduces multiple changes aimed at improving the development environment, refining the CI/CD workflows, and enhancing the database schema. The most important changes include the addition of a development container configuration, modifications to the GitHub Actions workflows, and updates to the database context and migrations.
Development Environment:
.devcontainer/devcontainer.json
to streamline the setup process for the RazorPagesMovie project. This includes specifying the Docker image, port forwarding, and VS Code customizations.CI/CD Workflows:
staging-end2end-tests
job toqa-functional-UI-tests
and updated its permissions and environment configuration in.github/workflows/cd.yml
.qa-functional-UI-tests
job to include telemetry data gathering and running UI automated Selenium tests.production
job to depend onqa-functional-UI-tests
and added a condition to run only on the main branch.build-and-publish-docker-image
job to only on pull requests to the main branch. [1] [2]Database Schema:
RazorPagesMovieContext
to include aUsers
DbSet and added configurations forUser
andMovie
entities, including seeding initial data with hashed passwords.