rasti-app 2.1.1 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rasti/app/user.rb +18 -0
- data/lib/rasti/app/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb6ae227fe341f8516342a1b77e69e817a4b00a7
|
4
|
+
data.tar.gz: 2fdc4e63857511183f613125dcce22eba52a6639
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 491d2bfc2bc96a8a04d96f9b2142d148e1f70700899b37ede5ec9bdc34964c3a6db4b2c8b7cb5ed54c8caca478054ffb689b6c86d5667e78e2a28953e14d2abb
|
7
|
+
data.tar.gz: 53d339263234592739ea9c5780c69448d28c44ee3d3c87be3dd5a57a5d3204946e7e547862744ba578e9a9c0bd5fe4631ecd08abcf92b5964723c6e0b5b9a05e
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Rasti
|
2
|
+
class App
|
3
|
+
class User
|
4
|
+
|
5
|
+
attr_reader :name, :permissions
|
6
|
+
|
7
|
+
def initialize(attributes={})
|
8
|
+
@name = attributes[:name]
|
9
|
+
@permissions = attributes.fetch(:permissions, [])
|
10
|
+
end
|
11
|
+
|
12
|
+
def authorized?(permission)
|
13
|
+
permissions.any? { |p| Permission.new(p).include? permission }
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/rasti/app/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rasti-app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriel Naiman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inflecto
|
@@ -248,6 +248,7 @@ files:
|
|
248
248
|
- lib/rasti/app/service_factory.rb
|
249
249
|
- lib/rasti/app/session.rb
|
250
250
|
- lib/rasti/app/settings.rb
|
251
|
+
- lib/rasti/app/user.rb
|
251
252
|
- lib/rasti/app/utils.rb
|
252
253
|
- lib/rasti/app/version.rb
|
253
254
|
- rasti-app.gemspec
|