lita-activedirectory 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lita/handlers/activedirectory.rb +8 -18
- data/lib/utils/cratususer.rb +1 -1
- data/lita-activedirectory.gemspec +1 -1
- data/locales/en.yml +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 08485dbe161fadc4b33a407554004bef9abdaaa6
|
4
|
+
data.tar.gz: eef09887231db2d23732984911374d6045efc453
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4f758acc794da870b4a9a6038ea826c8e254fca42e1e32fda16b0b98d1b5747d0cc227b0a4bed609b2c6480a9780a267dc6b470c90807ac2b35643bc20ed94d
|
7
|
+
data.tar.gz: eebbe685f1433fdd77886369fac3c02f7ec64c3265ab27abd1ceaa6d89646e2d77a227729c34a40fe1c307c3c337d9e762426a44454e874c6883687610ed8988
|
@@ -6,6 +6,7 @@ module Lita
|
|
6
6
|
config :port, required: true, type: Integer, default: 389
|
7
7
|
config :basedn, required: true, type: String
|
8
8
|
config :user_basedn, required: true, type: String
|
9
|
+
config :group_basedn, required: true, type: String
|
9
10
|
config :username, required: true, type: String
|
10
11
|
config :password, required: true, type: String
|
11
12
|
|
@@ -53,7 +54,13 @@ module Lita
|
|
53
54
|
user = response.matches[0][0]
|
54
55
|
response.reply_with_mention(t('replies.user_groups.working'))
|
55
56
|
group_results = user_groups_query(user)
|
56
|
-
|
57
|
+
if group_results.nil?
|
58
|
+
response.reply_with_mention(
|
59
|
+
t('replies.user_groups.error', user: user)
|
60
|
+
)
|
61
|
+
else
|
62
|
+
response.reply group_results
|
63
|
+
end
|
57
64
|
end
|
58
65
|
|
59
66
|
private
|
@@ -75,23 +82,6 @@ module Lita
|
|
75
82
|
end
|
76
83
|
end
|
77
84
|
|
78
|
-
def handle_user_query(response, user, result)
|
79
|
-
case result
|
80
|
-
when true
|
81
|
-
response.reply_with_mention(
|
82
|
-
t('replies.user_locked?.locked', user: user)
|
83
|
-
)
|
84
|
-
when false
|
85
|
-
response.reply_with_mention(
|
86
|
-
t('replies.user_locked?.notlocked', user: user)
|
87
|
-
)
|
88
|
-
when nil
|
89
|
-
response.reply_with_mention(
|
90
|
-
t('replies.user_locked?.error', user: user)
|
91
|
-
)
|
92
|
-
end
|
93
|
-
end
|
94
|
-
|
95
85
|
def handle_unlock_query(response, user, result)
|
96
86
|
case result
|
97
87
|
when true
|
data/lib/utils/cratususer.rb
CHANGED
data/locales/en.yml
CHANGED