caboose-cms 0.7.50 → 0.7.51

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: 9b58501d798ee6dd520475669eceb99c09f13e9c
4
- data.tar.gz: 32fba4ffcbaabe2177813d854c5a08739f1d1f84
3
+ metadata.gz: 111709b91219786159dcba587ee268606c6557f5
4
+ data.tar.gz: cc4f62acaaec065b95d6351ecbee073faab1d859
5
5
  SHA512:
6
- metadata.gz: 40f9f0f70d178446b26b74f0679ee9185b85afec6e2b71c215a0732ce750126791a1c11970d7d2535d3c6a0b05f58daca6e6893356c0504397c75b3b6012bc61
7
- data.tar.gz: a6b9faefa91b639810c4f43215be8762d20d2c854a99b07ae3e0c0d80fcadea9dc424f9dbc38fb23addda78ba4e3703cd4f40ccf072b495dce207ab1c00f0888
6
+ metadata.gz: 804fde02be86ba41e11ed04992dc092150798ce9ee581f9a6da4abedfe0ff6152ef955ebd8cbc28adfd1a5a4bd02f5f1454af023b1f9323033c63b51578b6afa
7
+ data.tar.gz: 02c7c23a85e88db4b141c92d954b3f2539e833b5373d8c50b9835464be4afe2487b02a333af4c6233101812b4ae5e2d411c81aa85c8335e24616ecb16c5d4f61
@@ -34,10 +34,15 @@ class Caboose::User < ActiveRecord::Base
34
34
  #return self::LOGGED_OUT_USER_ID
35
35
  end
36
36
 
37
- def is_allowed(resource, action)
38
-
37
+ def is_logged_out_user?
38
+ return self.id == Caboose::User.logged_out_user_id(self.site_id)
39
+ end
40
+
41
+ def is_allowed(resource, action)
39
42
  elo = Caboose::Role.logged_out_role(self.site_id)
40
- return true if elo.is_allowed(resource, action)
43
+ elo_is_allowed = elo.is_allowed(resource, action)
44
+ return true if elo_is_allowed
45
+ return false if !elo_is_allowed && self.is_logged_out_user?
41
46
  eli = Caboose::Role.logged_in_role(self.site_id)
42
47
  return true if self.id != elo.id && eli.is_allowed(resource, action)
43
48
  for role in roles
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.7.50'
2
+ VERSION = '0.7.51'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.50
4
+ version: 0.7.51
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-20 00:00:00.000000000 Z
11
+ date: 2016-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg