Project

General

Profile

Plugins Directory » Auto User Activation

Author: Jérôme BATAILLE
Website: https://github.com/Smile-SA/redmine_smile_auto_user_activation
Code repository: https://github.com/Smile-SA/redmine_smile_auto_user_activation
Registered on: 2019-04-10 (over 5 years ago)
Current version: 1.0.4
Compatible with: Redmine 4.0.x, 3.4.x, 3.3.x, 3.2.x, 3.1.x, 3.0.x
User ratings:   (0)

Redmine plugin that adds the ability to auto enable new users, the first time they are added as member of a project.

  • Not yet activated users are available in add Members to Project popup.
    A notice message is added when user(s) have been activated.
  • Optionally a default group can be assigned to them.

Overrides the Members create action

  • Members Controller action create
    Activate users when added to project, if no error
    Generate a flash message to indicate which users have been activated
    Optionally : if group name set in plugin settings, add newly activated users to a group
  • Members View app/views/members/create.js.erb

Overrides Helpers

  • Application Helper
    Method principals_check_box_tags
    New link option to have link on user, status class added
  • Groups Helper
    Method render_principals_for_new_group_users, added link param value
  • Members Helper
    Method render_principals_for_new_members helper
    Users listed : active -> active_or_to_activate
    Link to user enabled
    Grey color for users to activate (3rd param = true)
  • Users Helper
    Method change_status_link, add an un-activate link

Principal Model

  • New scopes active_or_to_activate, visible_any_status
  • New method add_to_group

Tools in lib/not_reloaded

  • smile_tools.rb
    Methods to trace overrides made by Smile plugins, overrides listed in plugin settings
    • trace_by_line
    • trace_override
    • regex_path_in_plugin

Method to debug a scope : debug_scope

  • plugin_config.rb
    Method get_default_group_for_user to cache the Group to add to the newly activated users

You have to Personalize not yet activated users color

It is highly suggested to give them a specific color in :
public/stylesheets/application.css or in your theme specific Css file if you have a theme.

#principals label.status-2 a {
    color: #8F9C9C;
}

Changelog

  • V1.0.4 Enforce override of MembersController.create
    Trigger an exception that prevents application to start if override fails
  • V1.0.3 New option to add debug traces in Rails log file
  • V1.0.2 New option to add user in a default group
  • V1.0.0 Initial version

Enjoy !

Changelog

1.0.4 (2019-05-03)

Compatible with Redmine 4.0.x, 3.4.x, 3.3.x, 3.2.x, 3.1.x, 3.0.x.

  • Enforce override of MembersController.create
    Trigger an exception that prevents application to start if override fails

1.0.3 (2019-04-26)

Compatible with Redmine 4.0.x, 3.4.x, 3.3.x, 3.2.x, 3.1.x, 3.0.x.

  • New option to add debug traces in Rails log file

1.0.2 (2019-04-25)

Compatible with Redmine 4.0.x, 3.4.x, 3.3.x, 3.2.x, 3.1.x, 3.0.x.

New option to add the User to a Default Group when user is activated.

add_to_default_group.png (27.3 KB) add_to_default_group.png Jérôme BATAILLE, 2019-04-25 23:53

1.0.1 (2019-03-14)

Compatible with Redmine 4.0.x, 3.4.x, 3.3.x, 3.2.x, 3.1.x, 3.0.x, 2.6.x.