Skip to content

Active or inactive user: existing code to adjust #44

@Xarkam

Description

@Xarkam

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions