aptible-auth 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aptible/auth/organization.rb +4 -0
- data/lib/aptible/auth/user.rb +12 -0
- data/lib/aptible/auth/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2be2c6ded4793b2f3ca17c3f090b2987a3f8d483
|
4
|
+
data.tar.gz: d2e407cfb0d6f5c9dd9601728472d9c5932eca7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5172825e130142534a25cefa418e728874ab474e8a591eba6a2e5fb17d82be32a8233f99d36b67103e201101ffcb42f71775231551a53e9c3cf38691de099651
|
7
|
+
data.tar.gz: b478a51b2f8f710ec4972300ee4007f83ae8a877187f976d02f514bcd199fb6311e02e6853230aac0d7413f14502c9c549f9bacf39ba929c61eaf898eae9d935
|
data/lib/aptible/auth/user.rb
CHANGED
@@ -34,6 +34,18 @@ module Aptible
|
|
34
34
|
roles.map(&:organization).uniq(&:id)
|
35
35
|
end
|
36
36
|
|
37
|
+
def organization_roles(organization)
|
38
|
+
roles.select do |role|
|
39
|
+
role.links['organization'].href == organization.href
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def organization_privileged_roles(organization)
|
44
|
+
privileged_roles.select do |role|
|
45
|
+
role.links['organization'].href == organization.href
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
37
49
|
def operations
|
38
50
|
# TODO: Implement query params for /operations
|
39
51
|
[]
|
data/lib/aptible/auth/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aptible-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Macreery
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aptible-resource
|
@@ -205,4 +205,3 @@ test_files:
|
|
205
205
|
- spec/aptible/auth_spec.rb
|
206
206
|
- spec/shared/set_env.rb
|
207
207
|
- spec/spec_helper.rb
|
208
|
-
has_rdoc:
|