caber 0.3.1 → 0.4.0
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6bda935480f7b69fe515d693078cec12122b527fee405b593f83bda85dc6ba8
|
4
|
+
data.tar.gz: afde1293ded688ea93031794a4197465e9d799aa17c6ac8c8b0dca7897135e60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb3c8cbb9113114a4bb9d96686c839007b4809c445ead3a583d1f966a5ddb0aa1e824a612a49f31d517dcf167a56509327150182671b0d76ecee632a139c541e
|
7
|
+
data.tar.gz: 0dfa0445dbcfb9f78cf410b048b222809c6899ee31efe8ad12257468c1aac991ff552087913288638094e6f078bc853bf48db65ec551673dd99a76aa413e1e65
|
@@ -18,7 +18,9 @@ module Caber::Object
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def grant_permission_to(permission, subject)
|
21
|
-
Caber::Relation.
|
21
|
+
rel = Caber::Relation.find_or_initialize_by(subject: subject, object: self)
|
22
|
+
rel.permission = permission
|
23
|
+
rel.save!
|
22
24
|
end
|
23
25
|
|
24
26
|
def grants_permission_to?(permission, subject)
|
data/lib/caber/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|