RE: LDAP Authentication » redmine-0.8.1_add_ldap_group_auth.patch
| app/models/auth_source_ldap.rb (arbetskopia) | ||
|---|---|---|
|
ldap_con = initialize_ldap_con(self.account, self.account_password)
|
||
|
login_filter = Net::LDAP::Filter.eq( self.attr_login, login )
|
||
|
object_filter = Net::LDAP::Filter.eq( "objectClass", "*" )
|
||
|
# is the memberof filled?
|
||
|
if !memberof.empty?
|
||
|
object_filter = object_filter & Net::LDAP::Filter.eq( "memberOf", memberof )
|
||
|
end
|
||
|
dn = String.new
|
||
|
ldap_con.search( :base => self.base_dn,
|
||
|
:filter => object_filter & login_filter,
|
||
| app/views/auth_sources/_form.rhtml (arbetskopia) | ||
|---|---|---|
|
<p><label for="auth_source_base_dn"><%=l(:field_base_dn)%> <span class="required">*</span></label>
|
||
|
<%= text_field 'auth_source', 'base_dn', :size => 60 %></p>
|
||
|
<p><label for="auth_source_memberof"><%=l(:field_memberof)%></label>
|
||
|
<%= text_field 'auth_source', 'memberof', :size => 60 %></p>
|
||
|
<p><label for="auth_source_onthefly_register"><%=l(:field_onthefly)%></label>
|
||
|
<%= check_box 'auth_source', 'onthefly_register' %></p>
|
||
|
</div>
|
||
| lang/en.yml (arbetskopia) | ||
|---|---|---|
|
field_port: Port
|
||
|
field_account: Account
|
||
|
field_base_dn: Base DN
|
||
|
field_memberof: Member of
|
||
|
field_attr_login: Login attribute
|
||
|
field_attr_firstname: Firstname attribute
|
||
|
field_attr_lastname: Lastname attribute
|
||
| lang/sv.yml (arbetskopia) | ||
|---|---|---|
|
field_port: Port
|
||
|
field_account: Konto
|
||
|
field_base_dn: Bas-DN
|
||
|
field_memberof: Medlem i
|
||
|
field_attr_login: Inloggningsattribut
|
||
|
field_attr_firstname: Förnamnsattribut
|
||
|
field_attr_lastname: Efternamnsattribut
|
||