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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b3614eb0d0ce0548b1b6db261af778449902de9
4
- data.tar.gz: 0962357844244a7f159812c49e1183879c6392e9
3
+ metadata.gz: 62313a243de5189e8aa0283431d8c0d7662539ea
4
+ data.tar.gz: 485e81faa72feac2eb93ab2eb59f24afe486de78
5
5
  SHA512:
6
- metadata.gz: ec5727996288e4a77792425970aa9ba20395c98a2bc90aede889a40b33f91fd8bd13edd6a76ab80c229f02d589ac3fccfa032f2dfa5b9a9472da21e7f948df8a
7
- data.tar.gz: 2e61796d9a1f61ba66bc1f3951027b8fce12f2bb5dc26d84135c326fe98f7dedcbabafb3a6b0c56aaea28ae35aa74176505c21bb1c94f1d778b85af50e847352
6
+ metadata.gz: 2d844db40adefa08cc7bc3ccb2c11a6be39b1e6e4503ac9e752d1b08f7ec303b1722d8252e97f99206b88455c59d0d33e8fca6ee3b5360e5012fb40a933b659b
7
+ data.tar.gz: a5e469b0e6a512d2e56b32adcd88d6398df76eda0922acefc5c88127ab572730162fd7f7be0be276fd438e6f3151f68a4e8ddcd6222eb930c758601e6be27993
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lita-ey-base (0.0.1)
4
+ lita-ey-base (0.0.2)
5
5
  engineyard
6
6
  lita (>= 3.2.0)
7
7
 
@@ -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.1"
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.}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-ey-base
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Paramio