Feature #16727

redmine ldap sync plugin should allow syncing a particualr user

Added by anil venkata about 8 years ago. Updated about 8 years ago.

Status:ClosedStart date:
Priority:UrgentDue date:
Assignee:-% Done:


Category:Plugin API
Target version:-


redmine ldap sync plugin has rake tasks which allows to sync all users and groups.
In our company we have an internal tool which we will use to manage redmine and gerrit. As an administrator of our company redmine, I want to sync only the new user who has been added to ldap through our internal tool. To sync all the users/groups we use rake task in the plugin. I don't think there is a rake task to sync only a particular user.

Can this plugin be enhanced to add a rake task which allows to sync a particular user, may be
sync user from ldap for a given user login name.


#1 Updated by Daniel Hger about 8 years ago

You just have to customize the following file: plugins/redmine_ldap_sync/lib/tasks/ldap_sync.rake

Currently the task looks like:

desc "Synchronize redmine's users fields and groups with those on LDAP" 
task :sync_users => :environment do |t, args|
AuthSourceLdap.activate_users! unless ENV['ACTIVATE_USERS'].nil?
AuthSourceLdap.all.each do |as|
trace "Synchronizing '#{as.name}' users..."

The fast and dirty way to achieve this is to add a check if as.name equals yourusername and execute the task 'as.sync_users' just if that check passes. This works the same for groups...

Should look like:

if as.name == "yourusername" 

I am also new to Ruby/Rails. Let me know if it works & Happy Easter,

#2 Updated by Jean-Philippe Lang about 8 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

Please, no plugin requests here in the Redmine issue tracker.

Also available in: Atom PDF