outposts/ldap: remove deprecated fields

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-01-07 09:52:19 +01:00
parent ececfc3a30
commit bf347730b3
2 changed files with 1 additions and 11 deletions

View file

@ -13,10 +13,6 @@ func (pi *ProviderInstance) UserEntry(u api.User) *ldap.Entry {
attrs = utils.EnsureAttributes(attrs, map[string][]string{ attrs = utils.EnsureAttributes(attrs, map[string][]string{
"memberOf": pi.GroupsForUser(u), "memberOf": pi.GroupsForUser(u),
// Old fields for backwards compatibility
"accountStatus": {utils.BoolToString(*u.IsActive)},
"superuser": {utils.BoolToString(u.IsSuperuser)},
// End old fields
"goauthentik.io/ldap/active": {utils.BoolToString(*u.IsActive)}, "goauthentik.io/ldap/active": {utils.BoolToString(*u.IsActive)},
"goauthentik.io/ldap/superuser": {utils.BoolToString(u.IsSuperuser)}, "goauthentik.io/ldap/superuser": {utils.BoolToString(u.IsSuperuser)},
"cn": {u.Username}, "cn": {u.Username},

View file

@ -215,8 +215,6 @@ class TestProviderLDAP(SeleniumTestCase):
"uidNumber": [str(2000 + o_user.pk)], "uidNumber": [str(2000 + o_user.pk)],
"gidNumber": [str(2000 + o_user.pk)], "gidNumber": [str(2000 + o_user.pk)],
"memberOf": [], "memberOf": [],
"accountStatus": ["true"],
"superuser": ["false"],
"goauthentik.io/ldap/active": ["true"], "goauthentik.io/ldap/active": ["true"],
"goauthentik.io/ldap/superuser": ["false"], "goauthentik.io/ldap/superuser": ["false"],
"goauthentik.io/user/override-ips": ["true"], "goauthentik.io/user/override-ips": ["true"],
@ -242,8 +240,6 @@ class TestProviderLDAP(SeleniumTestCase):
"uidNumber": [str(2000 + embedded_account.pk)], "uidNumber": [str(2000 + embedded_account.pk)],
"gidNumber": [str(2000 + embedded_account.pk)], "gidNumber": [str(2000 + embedded_account.pk)],
"memberOf": [], "memberOf": [],
"accountStatus": ["true"],
"superuser": ["false"],
"goauthentik.io/ldap/active": ["true"], "goauthentik.io/ldap/active": ["true"],
"goauthentik.io/ldap/superuser": ["false"], "goauthentik.io/ldap/superuser": ["false"],
"goauthentik.io/user/override-ips": ["true"], "goauthentik.io/user/override-ips": ["true"],
@ -272,8 +268,6 @@ class TestProviderLDAP(SeleniumTestCase):
f"cn={group.name},ou=groups,dc=ldap,dc=goauthentik,dc=io" f"cn={group.name},ou=groups,dc=ldap,dc=goauthentik,dc=io"
for group in self.user.ak_groups.all() for group in self.user.ak_groups.all()
], ],
"accountStatus": ["true"],
"superuser": ["true"],
"goauthentik.io/ldap/active": ["true"], "goauthentik.io/ldap/active": ["true"],
"goauthentik.io/ldap/superuser": ["true"], "goauthentik.io/ldap/superuser": ["true"],
"extraAttribute": ["bar"], "extraAttribute": ["bar"],