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 +4 -4
- data/app/models/caboose/user.rb +8 -3
- data/lib/caboose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 111709b91219786159dcba587ee268606c6557f5
|
4
|
+
data.tar.gz: cc4f62acaaec065b95d6351ecbee073faab1d859
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 804fde02be86ba41e11ed04992dc092150798ce9ee581f9a6da4abedfe0ff6152ef955ebd8cbc28adfd1a5a4bd02f5f1454af023b1f9323033c63b51578b6afa
|
7
|
+
data.tar.gz: 02c7c23a85e88db4b141c92d954b3f2539e833b5373d8c50b9835464be4afe2487b02a333af4c6233101812b4ae5e2d411c81aa85c8335e24616ecb16c5d4f61
|
data/app/models/caboose/user.rb
CHANGED
@@ -34,10 +34,15 @@ class Caboose::User < ActiveRecord::Base
|
|
34
34
|
#return self::LOGGED_OUT_USER_ID
|
35
35
|
end
|
36
36
|
|
37
|
-
def
|
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
|
-
|
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
|
data/lib/caboose/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2016-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|