cf-perm 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/perm/protos/actor_pb.rb +1 -1
- data/lib/perm/v1/client.rb +12 -12
- data/lib/perm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7125e6f9fded928fc9d49e833237643482d998e
|
4
|
+
data.tar.gz: 93406093631ca371dbaa93c4292be9bab1faa00f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e880c39115b70254c856b5fb0967f36bbd101ca1ebb0a252f1ac0b4e521d9f47adf784b3716efe6a509c6d18b5821a4ffca317aa9c815d0b7ce09d5ff8f068a
|
7
|
+
data.tar.gz: f374e854a82c72a19278c410d1618aab0d2dedabba1fff5cd21880ec24ad243fc6c006469297f4c977222e755a22aea858ea7e7a0495907eee2ef12079e6b7eb
|
data/lib/perm/protos/actor_pb.rb
CHANGED
data/lib/perm/v1/client.rb
CHANGED
@@ -54,8 +54,8 @@ module CloudFoundry
|
|
54
54
|
raise Errors.from_grpc_error(e)
|
55
55
|
end
|
56
56
|
|
57
|
-
def assign_role(role_name:, actor_id:,
|
58
|
-
actor = Protos::Actor.new(id: actor_id,
|
57
|
+
def assign_role(role_name:, actor_id:, namespace:)
|
58
|
+
actor = Protos::Actor.new(id: actor_id, namespace: namespace)
|
59
59
|
request = Protos::AssignRoleRequest.new(actor: actor, role_name: role_name)
|
60
60
|
|
61
61
|
grpc_role_service.assign_role(request)
|
@@ -65,8 +65,8 @@ module CloudFoundry
|
|
65
65
|
raise Errors.from_grpc_error(e)
|
66
66
|
end
|
67
67
|
|
68
|
-
def unassign_role(role_name:, actor_id:,
|
69
|
-
actor = Protos::Actor.new(id: actor_id,
|
68
|
+
def unassign_role(role_name:, actor_id:, namespace:)
|
69
|
+
actor = Protos::Actor.new(id: actor_id, namespace: namespace)
|
70
70
|
request = Protos::UnassignRoleRequest.new(actor: actor, role_name: role_name)
|
71
71
|
|
72
72
|
grpc_role_service.unassign_role(request)
|
@@ -77,8 +77,8 @@ module CloudFoundry
|
|
77
77
|
end
|
78
78
|
|
79
79
|
# rubocop:disable Naming/PredicateName
|
80
|
-
def has_role?(role_name:, actor_id:,
|
81
|
-
actor = Protos::Actor.new(id: actor_id,
|
80
|
+
def has_role?(role_name:, actor_id:, namespace:)
|
81
|
+
actor = Protos::Actor.new(id: actor_id, namespace: namespace)
|
82
82
|
request = Protos::HasRoleRequest.new(actor: actor, role_name: role_name)
|
83
83
|
|
84
84
|
response = grpc_role_service.has_role(request)
|
@@ -87,8 +87,8 @@ module CloudFoundry
|
|
87
87
|
raise Errors.from_grpc_error(e)
|
88
88
|
end
|
89
89
|
|
90
|
-
def list_actor_roles(actor_id:,
|
91
|
-
actor = Protos::Actor.new(id: actor_id,
|
90
|
+
def list_actor_roles(actor_id:, namespace:)
|
91
|
+
actor = Protos::Actor.new(id: actor_id, namespace: namespace)
|
92
92
|
request = Protos::ListActorRolesRequest.new(actor: actor)
|
93
93
|
|
94
94
|
response = grpc_role_service.list_actor_roles(request)
|
@@ -114,8 +114,8 @@ module CloudFoundry
|
|
114
114
|
raise Errors.from_grpc_error(e)
|
115
115
|
end
|
116
116
|
|
117
|
-
def has_permission?(actor_id:,
|
118
|
-
actor = Protos::Actor.new(id: actor_id,
|
117
|
+
def has_permission?(actor_id:, namespace:, permission_name:, resource_id:)
|
118
|
+
actor = Protos::Actor.new(id: actor_id, namespace: namespace)
|
119
119
|
request = Protos::HasPermissionRequest.new(
|
120
120
|
actor: actor,
|
121
121
|
permission_name: permission_name,
|
@@ -128,8 +128,8 @@ module CloudFoundry
|
|
128
128
|
raise Errors.from_grpc_error(e)
|
129
129
|
end
|
130
130
|
|
131
|
-
def list_resource_patterns(actor_id:,
|
132
|
-
actor = Protos::Actor.new(id: actor_id,
|
131
|
+
def list_resource_patterns(actor_id:, namespace:, permission_name:)
|
132
|
+
actor = Protos::Actor.new(id: actor_id, namespace: namespace)
|
133
133
|
request = Protos::ListResourcePatternsRequest.new(
|
134
134
|
actor: actor,
|
135
135
|
permission_name: permission_name
|
data/lib/perm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cf-perm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CloudFoundry Permissions Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grpc
|