@@ -67,7 +67,7 @@ service ExperimentalService {
6767 }
6868
6969 // EXPERIMENTAL: ComputablePermissions is an API that allows clients to request the set of
70- // permissions that compute based off a set of relations . For example, if a schema has a relation
70+ // permissions that compute based off a relation . For example, if a schema has a relation
7171 // `viewer` and a permission `view` defined as `permission view = viewer + editor`, then the
7272 // computable permissions for the relation `viewer` will include `view`.
7373 rpc ExperimentalComputablePermissions (ExperimentalComputablePermissionsRequest )
@@ -79,8 +79,8 @@ service ExperimentalService {
7979 }
8080
8181 // EXPERIMENTAL: DependentRelations is an API that allows clients to request the set of
82- // relations that used to compute a permission, recursively. It is the inverse of the
83- // ComputablePermissions API.
82+ // relations and permissions that used to compute a permission, recursively. It is the
83+ // inverse of the ComputablePermissions API.
8484 rpc ExperimentalDependentRelations (ExperimentalDependentRelationsRequest )
8585 returns (ExperimentalDependentRelationsResponse ) {
8686 option (google.api.http ) = {
@@ -296,36 +296,33 @@ message ExpPermission {
296296
297297message ExperimentalComputablePermissionsRequest {
298298 Consistency consistency = 1 ;
299- repeated ExpRelationReference relations = 2 ;
299+ string definition_name = 2 ;
300+ string relation_name = 3 ;
300301
301302 // optional_definition_name_match is a prefix that is matched against the definition name(s)
302303 // for the permissions returned.
303304 // If not specified, will be ignored.
304- string optional_definition_name_filter = 3 ;
305+ string optional_definition_name_filter = 4 ;
305306}
306307
307- // ExpRelationReference is a reference to a relation in the schema.
308+ // ExpRelationReference is a reference to a relation or permission in the schema.
308309message ExpRelationReference {
309310 string definition_name = 1 ;
310311 string relation_name = 2 ;
311- }
312-
313- // ExpPermissionReference is a reference to a permission in the schema.
314- message ExpPermissionReference {
315- string definition_name = 1 ;
316- string permission_name = 2 ;
312+ bool is_permission = 3 ;
317313}
318314
319315message ExperimentalComputablePermissionsResponse {
320- repeated ExpPermissionReference permissions = 1 ;
316+ repeated ExpRelationReference permissions = 1 ;
321317
322318 // read_at is the ZedToken at which the schema was read.
323319 ZedToken read_at = 2 ;
324320}
325321
326322message ExperimentalDependentRelationsRequest {
327323 Consistency consistency = 1 ;
328- ExpPermissionReference permission = 2 ;
324+ string definition_name = 2 ;
325+ string permission_name = 3 ;
329326}
330327
331328message ExperimentalDependentRelationsResponse {
0 commit comments