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

Check user lockout for user log in from LDAP #2692

Merged
merged 2 commits into from Nov 15, 2017

Conversation

sishuoyang
Copy link
Contributor

I am developing an enterprise application. All my user login solely from LDAP.
And I have an admin portal to manage all application users.

Admin user can set a user's LockoutEndDateUtc column to temporarily prevent the user from login.

However, the LoginManager doesn't check lockout status if the user is logged in from LDAP.

I have added the logic to check lockout status in this PR.

check user lockout status for users log in using LDAP
@sishuoyang
Copy link
Contributor Author

Actually, I am thinking if it is ok to run UserManager.IsLockedOutAsync(user) for all type of login. In that case, below block can be placed above if (!loggedInFromExternalSource)

if (await UserManager.IsLockedOutAsync(user))
                    {
                        return new AbpLoginResult<TTenant, TUser>(AbpLoginResultType.LockedOut, tenant, user);
                    }

@hikalkan
Copy link
Member

We assumed that LDAP already it's own lockout system. However, you are right, we can check lockout in either case. Can you make the change and update your PR. Thanks.

Check lockedout status for all authentication source.
@hikalkan hikalkan added this to the v3.2 milestone Nov 15, 2017
@hikalkan hikalkan merged commit 8f8570c into aspnetboilerplate:dev Nov 15, 2017
@hikalkan
Copy link
Member

Thank you for your contribution.

@sishuoyang
Copy link
Contributor Author

Thank you for your great framework.

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

Successfully merging this pull request may close these issues.

None yet

2 participants