Giter Club home page Giter Club logo

Comments (6)

thorin avatar thorin commented on August 29, 2024

It's a redmine limitation:
http://www.redmine.org/projects/redmine/repository/entry/trunk/app/models/user.rb#L76
Both the firstname and lastname have a limitation of 30 characters.
If you have users on ldap with names longer than that, redmine will be
unable to automatically create those users.

On Thu, Feb 16, 2012 at 8:07 PM, ahnooie <
[email protected]

wrote:

I have one user that gets a blank screen after login, here's the error:

Processing AccountController#login (for 10.0.1.61 at 2012-02-16 18:36:18)
[POST]
Parameters: {"action"=>"login", "authenticity_token"=>"(removed)",
"username"=>"abcdefgh", "
controller"=>"account", "password"=>"[FILTERED]", "login"=>"Login
\302\273"}
User 'dmathews' created from external auth source: AuthSourceLdap - AD

ActiveRecord::RecordInvalid (Validation failed: Name is too long (maximum
is 30 characters)):
app/controllers/account_controller.rb:147:in password_authentication' app/controllers/account_controller.rb:142:inauthenticate_user'
app/controllers/account_controller.rb:30:in login' passenger (2.2.14) lib/phusion_passenger/rack/request_handler.rb:92:in process_request'
passenger (2.2.14)
lib/phusion_passenger/abstract_request_handler.rb:207:in main_loop' passenger (2.2.14) lib/phusion_passenger/railz/application_spawner.rb:441:in start_request_handler'
passenger (2.2.14)
lib/phusion_passenger/railz/application_spawner.rb:381:in
handle_spawn_application' passenger (2.2.14) lib/phusion_passenger/utils.rb:252:insafe_fork'
passenger (2.2.14)
lib/phusion_passenger/railz/application_spawner.rb:377:in
handle_spawn_application' passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:352:in send'
passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:352:in
main_loop' passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:196:in start_synchronously'
passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:163:in start' passenger (2.2.14) lib/phusion_passenger/railz/application_spawner.rb:222:instart'
passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:262:in
spawn_rails_application' passenger (2.2.14) lib/phusion_passenger/abstract_server_collection.rb:126:inlookup_or_add'
passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:256:in
spawn_rails_application' passenger (2.2.14) lib/phusion_passenger/abstract_server_collection.rb:80:insynchronize'
passenger (2.2.14)
lib/phusion_passenger/abstract_server_collection.rb:79:in synchronize' passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:255:in spawn_rails_application'
passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:154:in
spawn_application' passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:287:in handle_spawn_application'
passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:352:in
__send__' passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:352:in main_loop'
passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:196:in
`start_synchronously'

What do the 30 characters refer to? The group name? If so can that field
length be increased or is that a redmine limitation?

Here are my settings:

LDAP settings (running this against AD)
Groups Base DN: dc=mydomain,dc=com
Users objectclass: user
Groups objectclass: group
Group membership: On the group class
Enable nested groups: Disabled

Attributes:
Group name (group): sAMAccountName
Account flags (user): userAccountControl
Member users (group): member
Memberid (user): dn

Synchronization Options:
Create new groups: [x]
Create new users: [x]
Sync user attributes: [x]

Attributes to by synced:
First name [x]
Last name [x]
Email [x]

Thanks.


Reply to this email directly or view it on GitHub:
#25

from redmine_ldap_sync.

ahnooie avatar ahnooie commented on August 29, 2024

This user has a first name of 3 chars and last name is 7 chars... is there a way I can tell why it's going over 30 characters? Thanks.

from redmine_ldap_sync.

thorin avatar thorin commented on August 29, 2024

On your configuration you have enable the synchronization of
the user's attributes (First Name, Last Name and email).
Just make sure the first name and last name of the user haven't been
updated on ldap.

If you can and if the user's name hasn't been changed on ldap, on the
plugin disable the attribute synchronization and ask the user to try to
login again.
This should clear if it is or not a bug on the plugin.

Anyway I'll try to avoid to present a blank page on this cases, if possible.

from redmine_ldap_sync.

ahnooie avatar ahnooie commented on August 29, 2024

Thanks, I got it to work for the user by leaving "create new groups" unchecked. The nice thing is the group mapping still occurs, I just have to create the groups manually in Redmine. Ideally if that error is encountered it would be nice just to skip the problem group automatically and let the user login anway... but this solution works and is actually preferable to syncing groups so I don't pollute Redmine with thousands of AD groups. I appreciate your help.

from redmine_ldap_sync.

thorin avatar thorin commented on August 29, 2024

Ok, I'll close the issue after I fix the error handling on the group creation.

Thank you for reporting this.

from redmine_ldap_sync.

thorin avatar thorin commented on August 29, 2024

Fixed and closing.

from redmine_ldap_sync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.