unidom-authorization 1.2 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/unidom/authorization/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 938d3c07af2bae2879119f6558021fb8b7c83c7d
|
|
4
|
+
data.tar.gz: 986b54aa60dc82d89d5736b5436b2b7f0456e371
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ae487dbf2298af1ac199aeeba40d53bccdcd393ab4b97ee7c44eb913f54c059b534511842db748b237a941b5b6346f0d41e297700296e583138d8c1ec90b06e7
|
|
7
|
+
data.tar.gz: 8d775811160698c69ee5b7356f792b2c57c8b0bdfcb9e8673b2ea91823b5854fe338e396d792cc46941f964ebd6cb2d3347b714d5c222c6ecc6778bb80fefcf7
|
data/README.md
CHANGED
|
@@ -38,13 +38,13 @@ user.is_authorized! permission: permission, by: administrator, at: Time.now
|
|
|
38
38
|
user.is_authorized? permission: permission, at: Time.now # true
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
## Include the
|
|
41
|
+
## Include the Concerns
|
|
42
42
|
```ruby
|
|
43
43
|
include Unidom::Authorization::Concerns::AsAuthorized
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
### As Authorized concern
|
|
47
|
-
The As Authorized concern do the following tasks for the includer automatically:
|
|
47
|
+
The As Authorized concern do the following tasks for the includer automatically:
|
|
48
48
|
1. Define the has_many :authorizings macro as: ``has_many :authorizings, class_name: 'Unidom::Authorization::Authorizing', as: :authorized``
|
|
49
49
|
2. Define the has_many :permissions macro as: ``has_many :permissions, through: :authorizings, source: :permission``
|
|
50
50
|
3. Define the #is_authorized! method as: ``def is_authorized!(permission: nil, by: nil, at: Time.now)``
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: unidom-authorization
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 1.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Topbit Du
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-08-
|
|
11
|
+
date: 2016-08-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: unidom-common
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0
|
|
19
|
+
version: '1.0'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '0
|
|
26
|
+
version: '1.0'
|
|
27
27
|
description: Unidom (UNIfied Domain Object Model) is a series of domain model engines.
|
|
28
28
|
The Authorization domain model engine includes the Permission and Authorizing models.
|
|
29
29
|
Unidom (统一领域对象模型)是一系列的领域模型引擎。授权领域模型引擎包括权限、授权的模型。
|