rhino_project_core 0.21.0.beta.45 → 0.21.0.beta.46
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rhino/resource/active_record_extension.rb +1 -0
- data/lib/rhino/resource/owner.rb +0 -1
- data/lib/rhino/resource.rb +15 -11
- data/lib/rhino/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5523b3587da0f1a5099bb649e0f1243a716a85b27379372ab513c9beb759f3fa
|
4
|
+
data.tar.gz: be28497ecfe5fec48183bdddab3b5a13f4e4c0d4a3fa0e2c01bc9153509bf31e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5728dd8cc8a7cd570b01af965bd87365f216910ac66011b40023d1e8a632be9edf4275de5b66ed1d89ea054c741e6ea55b0393fd1f848c3ee2d8fa5933009f3
|
7
|
+
data.tar.gz: 5a10bba5d890d5f71d8930b34e65de0094130c7b477ffcfc5121877e432103107e45fbf2b360cd4b11bfb1e3741cebe78962b902a7edb47d4ebc554f6890d0cb
|
@@ -24,6 +24,7 @@ module Rhino
|
|
24
24
|
include Rhino::Resource::ActiveRecordExtension::Reference
|
25
25
|
include Rhino::Resource::ActiveRecordExtension::Describe
|
26
26
|
include Rhino::Resource::ActiveRecordExtension::Routing
|
27
|
+
include Rhino::Resource::ActiveRecordExtension::Owner
|
27
28
|
include Rhino::Resource::ActiveRecordExtension::Params
|
28
29
|
include Rhino::Resource::ActiveRecordExtension::Serialization
|
29
30
|
include Rhino::Resource::ActiveRecordExtension::Search
|
data/lib/rhino/resource/owner.rb
CHANGED
data/lib/rhino/resource.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative
|
4
|
-
require_relative
|
5
|
-
require_relative
|
6
|
-
require_relative
|
7
|
-
require_relative
|
8
|
-
require_relative
|
9
|
-
require_relative
|
10
|
-
require_relative
|
3
|
+
require_relative "resource/owner"
|
4
|
+
require_relative "resource/properties"
|
5
|
+
require_relative "resource/reference"
|
6
|
+
require_relative "resource/describe"
|
7
|
+
require_relative "resource/routing"
|
8
|
+
require_relative "resource/params"
|
9
|
+
require_relative "resource/serialization"
|
10
|
+
require_relative "resource/sieves"
|
11
11
|
|
12
|
-
require_relative
|
12
|
+
require_relative "../../app/policies/rhino/crud_policy"
|
13
13
|
|
14
14
|
module Rhino
|
15
15
|
module Resource
|
@@ -25,7 +25,7 @@ module Rhino
|
|
25
25
|
include Rhino::Resource::Sieves
|
26
26
|
|
27
27
|
included do
|
28
|
-
class_attribute :_policy_class
|
28
|
+
class_attribute :_policy_class
|
29
29
|
|
30
30
|
def owner
|
31
31
|
send self.class.resource_owned_by
|
@@ -41,7 +41,11 @@ module Rhino
|
|
41
41
|
|
42
42
|
class_methods do
|
43
43
|
def policy_class
|
44
|
-
_policy_class
|
44
|
+
self._policy_class ||= begin
|
45
|
+
return Rhino::GlobalPolicy if global_owned?
|
46
|
+
|
47
|
+
Rhino::CrudPolicy
|
48
|
+
end
|
45
49
|
end
|
46
50
|
|
47
51
|
def rhino_policy(policy)
|
data/lib/rhino/version.rb
CHANGED