web: fix package lock

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-10-03 00:51:52 +02:00
parent f3cc1be0f2
commit 1c52836060
3 changed files with 7 additions and 4 deletions

View File

@ -78,6 +78,6 @@ class UserLDAPSynchronizer(BaseLDAPSynchronizer):
ak_user.save() ak_user.save()
if "userAccountControl" in attributes: if "userAccountControl" in attributes:
uac = UserAccountControl(attributes.get("userAccountControl")) uac = UserAccountControl(attributes.get("userAccountControl"))
ak_user.is_active = UserAccountControl.ACCOUNTDISABLE in uac ak_user.is_active = UserAccountControl.ACCOUNTDISABLE not in uac
ak_user.save() ak_user.save()
return user_count return user_count

View File

@ -2,6 +2,8 @@
from ldap3 import MOCK_SYNC, OFFLINE_AD_2012_R2, Connection, Server from ldap3 import MOCK_SYNC, OFFLINE_AD_2012_R2, Connection, Server
from authentik.sources.ldap.sync.vendor.ad import UserAccountControl
def mock_ad_connection(password: str) -> Connection: def mock_ad_connection(password: str) -> Connection:
"""Create mock AD connection""" """Create mock AD connection"""
@ -54,7 +56,8 @@ def mock_ad_connection(password: str) -> Connection:
"objectSid": "user0", "objectSid": "user0",
"objectClass": "person", "objectClass": "person",
"distinguishedName": "cn=user0,ou=users,dc=goauthentik,dc=io", "distinguishedName": "cn=user0,ou=users,dc=goauthentik,dc=io",
"userAccountControl": 66050, "userAccountControl": UserAccountControl.ACCOUNTDISABLE
+ UserAccountControl.NORMAL_ACCOUNT,
}, },
) )
# User without SID # User without SID

4
web/package-lock.json generated
View File

@ -7010,7 +7010,7 @@
"node_modules/require-from-string": { "node_modules/require-from-string": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
"integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/view==", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
"engines": { "engines": {
"node": ">=0.10.0" "node": ">=0.10.0"
} }
@ -13786,7 +13786,7 @@
"require-from-string": { "require-from-string": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
"integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/view==" "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw=="
}, },
"require-main-filename": { "require-main-filename": {
"version": "2.0.0", "version": "2.0.0",