Patch für ldap user filter
This commit is contained in:
parent
a6b16394ed
commit
0c04610aa2
2 changed files with 26 additions and 0 deletions
19
files/ldap-user-filter.patch
Normal file
19
files/ldap-user-filter.patch
Normal file
|
@ -0,0 +1,19 @@
|
|||
--- lib/ldap/user.rb.orig 2021-07-28 23:16:02.518958920 +0200
|
||||
+++ lib/ldap/user.rb 2021-07-28 22:47:00.991810209 +0200
|
||||
@@ -95,7 +95,7 @@
|
||||
def valid?(username, password)
|
||||
bind_success = @ldap.connection.bind_as(
|
||||
base: @ldap.base_dn,
|
||||
- filter: "(#{login_attribute}=#{username})",
|
||||
+ filter: @user_filter ? "(&(#{login_attribute}=#{username})#{@user_filter})" : "(#{login_attribute}=#{username})",
|
||||
password: password
|
||||
)
|
||||
|
||||
@@ -179,6 +179,7 @@
|
||||
|
||||
@uid_attribute = config[:uid_attribute]
|
||||
@filter = config[:filter]
|
||||
+ @user_filter = config[:user_filter]
|
||||
end
|
||||
end
|
||||
end
|
|
@ -18,3 +18,10 @@
|
|||
patch:
|
||||
src: plain-text.patch
|
||||
dest: "{{ zammad_home }}/app/models/channel/email_build.rb"
|
||||
|
||||
# https://github.com/zammad/zammad/pull/3682
|
||||
- name: "zammad: Wende ldap-user-filter-Patch an"
|
||||
patch:
|
||||
src: ldap-user-filter.patch
|
||||
dest: "{{ zammad_home }}/lib/ldap/user.rb"
|
||||
|
||||
|
|
Loading…
Reference in a new issue