Skip to content
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

#542 Remove hard coded users details and read from csv file #1184

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

A-5ingh
Copy link
Contributor

@A-5ingh A-5ingh commented Oct 9, 2022

Fixes #542

@A-5ingh A-5ingh changed the title chore: added user data and read from csv Closes #542: Identity Refactoring Oct 9, 2022
@A-5ingh A-5ingh changed the title Closes #542: Identity Refactoring Remove hard coded users details and read from csv file Oct 9, 2022
@A-5ingh A-5ingh force-pushed the refactor/542-identity-startup branch from f0bd7cc to 7c7cd5a Compare October 9, 2022 20:05
@A-5ingh A-5ingh changed the title Remove hard coded users details and read from csv file #542 Remove hard coded users details and read from csv file Oct 9, 2022
@sonarcloud
Copy link

sonarcloud bot commented Oct 9, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@A-5ingh
Copy link
Contributor Author

A-5ingh commented Oct 11, 2022

@nicolas63 Can you please review this whenever you get time?

templates: [
{
file: 'Project.Test/Configuration/users-data.csv',
renameTo: generator => `${generator.testProjectDir}/bin/Debug/net6.0/Configuration/users-data.csv`,
Copy link
Member

Choose a reason for hiding this comment

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

i think it's not the good way to copy the csv in generated folder, we need to copy this file during the build

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I can take a look at an alternative to copy the file from main solution to test folder.

@@ -52,53 +72,10 @@ public static class IdentityConfiguration

private static IEnumerable<User> Users()
Copy link
Member

Choose a reason for hiding this comment

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

In this issue we want move role and user role association in a file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I thought it was users data which was required to be loaded from csv/json file. Now if I understand correctly, is it this piece of hardcoded values which needs to be in a file?

Copy link
Member

Choose a reason for hiding this comment

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

yes and also this

{
new Role {Id = "role_admin", Name = "ROLE_ADMIN"},
new Role {Id = "role_user",Name = "ROLE_USER"}
};

i think we can create 1 file per list

@nicolas63
Copy link
Member

Can you add documentation for this new feature ?

@A-5ingh
Copy link
Contributor Author

A-5ingh commented Oct 17, 2022

Can you add documentation for this new feature ?

Yes, @nicolas63 I'll add the relevant docs too. I'll also take a look at your requested changes.

# Conflicts:
#	generators/server/templates/dotnetcore/src/Directory.Packages.props
@A-5ingh A-5ingh force-pushed the refactor/542-identity-startup branch from 7c7cd5a to efe65a6 Compare October 16, 2023 19:39
@sonarcloud
Copy link

sonarcloud bot commented Oct 16, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IdentityStartup Refactoring
2 participants