Skip to content

Active or inactive user: existing code to adjust #44

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

Open
Xarkam opened this issue Feb 23, 2021 · 0 comments
Open

Active or inactive user: existing code to adjust #44

Xarkam opened this issue Feb 23, 2021 · 0 comments

Comments

@Xarkam
Copy link
Contributor

Xarkam commented Feb 23, 2021

As part of the management of roles / permissions, we have requests that make a join on the link of the role or permission to the user.

Typically queries that determine if "there is a user with own Admin permission" or "there is a role with Admin permission for extension X".

In these two queries, you must exclude non-active users:

  • account not yet activated
  • blocked account
  • see if we have planned other cases.

So add a join on the AspNetUsers table with a condition in the "on" of the join.

Location of the code concerned:

  • AspNetRolesRepository Method FindHavingUsers
  • UserPermissionRepository Method FindBy (string extensionName_, Common.Enums.Permission level_). Be careful, you will have to complete this method by passing for example a bool activeUsersOnly to false by default.

As it is necessary to complete the functional analysis relating to the management of users and their particularities (not yet active, blocked ...), this modification falls within the scope of this epic since the users cannot be modified beforehand.

Info: LockoutEnabled field to true in the User WIF = blocked account.

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

No branches or pull requests

1 participant