Univention Bugzilla – Attachment 10352 Details for
Bug 51259
Separate black- and whitelists for Self Service tabs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for separate white/blacklists for Self Service tabs "Password change" and "Your profile"
separate-black-white-lists-for-self-service.patch (text/plain), 2.20 KB, created by
Valentin Heidelberger
on 2020-05-10 10:12:25 CEST
(
hide
)
Description:
Patch for separate white/blacklists for Self Service tabs "Password change" and "Your profile"
Filename:
MIME Type:
Creator:
Valentin Heidelberger
Created:
2020-05-10 10:12:25 CEST
Size:
2.20 KB
patch
obsolete
>--- umc/python/passwordreset/__init__.py.baaaak 2020-05-09 17:16:09.540720269 +0200 >+++ umc/python/passwordreset/__init__.py 2020-05-09 13:31:35.015377388 +0200 >@@ -306,7 +306,7 @@ > @simple_response > def get_user_attributes(self, username, password): > dn, username = self.auth(username, password) >- if self.is_blacklisted(username): >+ if self.is_blacklisted(username, tab="profiledata"): > raise ServiceForbidden() > > user = self.get_udm_user_by_dn(dn) >@@ -411,7 +411,7 @@ > @simple_response > def validate_user_attributes(self, username, password, attributes): > dn, username = self.auth(username, password) >- if self.is_blacklisted(username): >+ if self.is_blacklisted(username, tab="profiledata"): > raise ServiceForbidden() > return self._validate_user_attributes(attributes) > >@@ -465,7 +465,7 @@ > @simple_response > def set_user_attributes(self, username, password, attributes): > dn, username = self.auth(username, password) >- if self.is_blacklisted(username): >+ if self.is_blacklisted(username, tab="profiledata"): > raise ServiceForbidden() > > user_attributes = [attr.strip() for attr in ucr.get('self-service/udm_attributes', '').split(',')] >@@ -1054,14 +1054,14 @@ > > # TODO: decoratorize > @machine_connection >- def is_blacklisted(self, username, ldap_connection=None, ldap_position=None): >+ def is_blacklisted(self, username, ldap_connection=None, ldap_position=None, tab="passwordreset"): > def listize(li): > return [x.lower() for x in map(str.strip, li.split(",")) if x] > >- bl_users = listize(ucr.get("umc/self-service/passwordreset/blacklist/users", "")) >- bl_groups = listize(ucr.get("umc/self-service/passwordreset/blacklist/groups", "")) >- wh_users = listize(ucr.get("umc/self-service/passwordreset/whitelist/users", "")) >- wh_groups = listize(ucr.get("umc/self-service/passwordreset/whitelist/groups", "")) >+ bl_users = listize(ucr.get("umc/self-service/{}/blacklist/users".format(tab), "")) >+ bl_groups = listize(ucr.get("umc/self-service/{}/blacklist/groups".format(tab), "")) >+ wh_users = listize(ucr.get("umc/self-service/{}/whitelist/users".format(tab), "")) >+ wh_groups = listize(ucr.get("umc/self-service/{}/whitelist/groups".format(tab), "")) > > username = self.email2username(username) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 51259
: 10352