Skip to content

Change the signatures of the remaining reflection APIs slightly#104

Merged
josephschorr merged 1 commit intoauthzed:mainfrom
josephschorr:exp-reflect-changes
May 7, 2024
Merged

Change the signatures of the remaining reflection APIs slightly#104
josephschorr merged 1 commit intoauthzed:mainfrom
josephschorr:exp-reflect-changes

Conversation

@josephschorr
Copy link
Copy Markdown
Member

No description provided.

message ExpPermissionReference {
string definition_name = 1;
string permission_name = 2;
bool is_permission = 3;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why a bool instead of ExpRelationReference and ExpPermissionReference?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because otherwise we'd need two distinct lists to be returned and this is easier to generate

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we treat permissions and relations as the same thing anywhere else in the API?
Whether we choose to do this or not just needs to be consistent across the entire API surface. We have to decide whether SpiceDB users need to know that permissions a form relation.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we do in all the other API endpoints. We usually name it one way or another (permission or relation), but you can CheckPermission on a relation, for example

@josephschorr josephschorr force-pushed the exp-reflect-changes branch from 50bc330 to d1c59ae Compare May 7, 2024 19:40
@josephschorr josephschorr merged commit 80f6ef8 into authzed:main May 7, 2024
@josephschorr josephschorr deleted the exp-reflect-changes branch May 7, 2024 20:12
@github-actions github-actions bot locked and limited conversation to collaborators May 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants