Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

enterprise-portal: update RPC for subscription domain and members#63105

Merged
unknwon merged 10 commits intomainfrom
jc/00-ep-rpc
Jun 6, 2024
Merged

enterprise-portal: update RPC for subscription domain and members#63105
unknwon merged 10 commits intomainfrom
jc/00-ep-rpc

Conversation

@unknwon
Copy link
Contributor

@unknwon unknwon commented Jun 5, 2024

Part of CORE-99

This PR adds new RPCs and fields for add and get/list subscription domain and members, prepare to be used by Cody Analytics related operations.

Test plan

CI

@cla-bot cla-bot bot added the cla-signed label Jun 5, 2024
@unknwon unknwon force-pushed the jc/00-ep-rpc branch 2 times, most recently from 58c50e8 to 49a219d Compare June 5, 2024 16:39
@unknwon unknwon marked this pull request as ready for review June 5, 2024 18:44
@unknwon unknwon requested a review from bobheadxi June 5, 2024 21:47
Comment on lines +226 to +228
// Return only product subscriptions contains the member with the given permission,
// e.g. "cody_analytics::analytics::read".
string permission = 2;
Copy link
Member

Choose a reason for hiding this comment

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

should we support repeated string permission, to match multiple permissions? Would that be an OR or an AND?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we want repeated string permission, I think we should treat as AND, to be consistent and no confusion.

Copy link
Member

Choose a reason for hiding this comment

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

The use case I'm thinking is "can this user either read or write to X" but I suppose it should just unsure that the relevant role has read and write explicitly, i.e. no permission implies another. So maybe we don't need a list here 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no permission implies another

I think this makes things a lot simpler, also this is what SAMS token scope spec does. (BTW "read/write" is an "action" in SAMS's term... 😂 😆 )

Copy link
Member

Choose a reason for hiding this comment

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

On that note, should we use the term scope instead of permission here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good!!! 😄

Copy link
Member

@bobheadxi bobheadxi left a comment

Choose a reason for hiding this comment

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

LGTM overall 😁 Nice!!

@bobheadxi bobheadxi requested a review from a team June 6, 2024 01:19
@unknwon unknwon merged commit 22e846a into main Jun 6, 2024
@unknwon unknwon deleted the jc/00-ep-rpc branch June 6, 2024 01:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants