lita-ey-base 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/lita/handlers/ey_base.rb +5 -0
- data/lita-ey-base.gemspec +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: 62313a243de5189e8aa0283431d8c0d7662539ea
|
4
|
+
data.tar.gz: 485e81faa72feac2eb93ab2eb59f24afe486de78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d844db40adefa08cc7bc3ccb2c11a6be39b1e6e4503ac9e752d1b08f7ec303b1722d8252e97f99206b88455c59d0d33e8fca6ee3b5360e5012fb40a933b659b
|
7
|
+
data.tar.gz: a5e469b0e6a512d2e56b32adcd88d6398df76eda0922acefc5c88127ab572730162fd7f7be0be276fd438e6f3151f68a4e8ddcd6222eb930c758601e6be27993
|
data/Gemfile.lock
CHANGED
@@ -47,11 +47,16 @@ module Lita
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def can_access?(user, app, env)
|
50
|
+
return true if ey_admin?(user)
|
50
51
|
group = required_group_to_access(app, env)
|
51
52
|
return true unless group
|
52
53
|
Lita::Authorization.user_in_group? user, required_group_to_access(app, env)
|
53
54
|
end
|
54
55
|
|
56
|
+
def ey_admin?(user)
|
57
|
+
Lita::Authorization.user_in_group? user, "ey_admins"
|
58
|
+
end
|
59
|
+
|
55
60
|
def access_denied_msg
|
56
61
|
"Sorry, you don't have access; you must be at %{group_name} group."
|
57
62
|
end
|
data/lita-ey-base.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "lita-ey-base"
|
3
|
-
spec.version = "0.0.
|
3
|
+
spec.version = "0.0.2"
|
4
4
|
spec.authors = ["Carlos Paramio"]
|
5
5
|
spec.email = ["cparamio@avallain.com"]
|
6
6
|
spec.description = %q{A Lita base handler with shared code for all ey-lita-* gems.}
|