Project

General

Profile

RE: LDAP Authentication » redmine-0.8.1_add_ldap_group_auth.patch

Anders Gustafsson, 2009-02-19 13:14

View differences:

app/models/auth_source_ldap.rb (arbetskopia)
38 38
    ldap_con = initialize_ldap_con(self.account, self.account_password)
39 39
    login_filter = Net::LDAP::Filter.eq( self.attr_login, login ) 
40 40
    object_filter = Net::LDAP::Filter.eq( "objectClass", "*" ) 
41
    # is the memberof filled?
42
    if !memberof.empty?
43
        object_filter = object_filter & Net::LDAP::Filter.eq( "memberOf", memberof )
44
    end
45

  
46

  
41 47
    dn = String.new
42 48
    ldap_con.search( :base => self.base_dn, 
43 49
                     :filter => object_filter & login_filter, 
app/views/auth_sources/_form.rhtml (arbetskopia)
23 23
<p><label for="auth_source_base_dn"><%=l(:field_base_dn)%> <span class="required">*</span></label>
24 24
<%= text_field 'auth_source', 'base_dn', :size => 60 %></p>
25 25

  
26
<p><label for="auth_source_memberof"><%=l(:field_memberof)%></label>
27
<%= text_field 'auth_source', 'memberof', :size => 60 %></p>
28

  
26 29
<p><label for="auth_source_onthefly_register"><%=l(:field_onthefly)%></label>
27 30
<%= check_box 'auth_source', 'onthefly_register' %></p>
28 31
</div>
lang/en.yml (arbetskopia)
157 157
field_port: Port
158 158
field_account: Account
159 159
field_base_dn: Base DN
160
field_memberof: Member of
160 161
field_attr_login: Login attribute
161 162
field_attr_firstname: Firstname attribute
162 163
field_attr_lastname: Lastname attribute
lang/sv.yml (arbetskopia)
155 155
field_port: Port
156 156
field_account: Konto
157 157
field_base_dn: Bas-DN
158
field_memberof: Medlem i
158 159
field_attr_login: Inloggningsattribut
159 160
field_attr_firstname: Förnamnsattribut
160 161
field_attr_lastname: Efternamnsattribut
    (1-1/1)