forked from go2null/redmine_account_policy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.rb
47 lines (37 loc) · 1.55 KB
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# update 'must_change_passwd' on admin login
require_dependency 'redmine_account_policy/account_controller_patch'
require_dependency 'redmine_account_policy/controller_account_success_authentication_after_hook'
require_dependency 'redmine_account_policy/mailer_patch'
require_dependency 'redmine_account_policy/my_controller_patch'
require_dependency 'redmine_account_policy/user_patch'
require_dependency 'redmine_account_policy/hooks'
require_dependency 'redmine_account_policy/users_helper_patch'
Redmine::Plugin.register :redmine_account_policy do
name 'Redmine Account Policy plugin'
description 'Password Expiry and other enhancements'
url 'https://github.com/go2null/redmine_account_policy'
author 'go2null'
author_url 'https://github.com/go2null'
version '0.2.0'
requires_redmine :version_or_higher => '2.6.0'
settings :default => {
# password complexity policy
password_complexity: '3',
# password expiry policy
password_max_age: '90',
password_expiry_warn_days: '14',
# password reuse policy
password_min_unique: '4',
password_min_age: '0',
# invalid logins policy
account_lockout_duration: '30',
account_lockout_threshold: '6',
notify_on_failure: 'off',
notify_on_lockout: 'on',
# unused accounts policy
unused_account_max_age: '90',
# daily cron hack
account_policy_checked_on: ''
}, :partial => 'settings/account_policy_settings'
end
#TODO: check out self.try_to_login