Skip to content

RSDK-14822: Let a user_permissions entry name several users - #936

Merged
Sagie Maoz (n0nick) merged 2 commits into
mainfrom
sm/repeated-users
Oct 26, 2026
Merged

Sagie Maoz (n0nick) merged 2 commits into
mainfrom
sm/repeated-users

Conversation

@n0nick

@n0nick Sagie Maoz (n0nick) commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Part of APP-17623 (Access policy management). First of three PRs: api → rdk (RSDK-14822) → app (APP-18398).

With this change, a single UserPermission object can describe multiple users, making for smaller config paylod. This is especially useful when App renders the full list of org owners and operators that are mapped to the full allowlist.

This should eventually replace the user field which will be deprecated.

🤖 Generated with Claude Code

Each UserPermission names exactly one user, so when app compiles an access
policy every member sharing a permission set repeats the whole list. Owners
and operators all carry the full allowlist, so auth.user_permissions grows
with members x permissions.

Add `repeated User users`, declared first since it supersedes `user`: a
writer should emit users, and a reader should ignore user when users is set.
`user` keeps field 1 for the wire and stays readable.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@viambot viambot added the safe to test committer is a member of this org label Oct 26, 2026
@n0nick Sagie Maoz (n0nick) added the ready-for-protos add this when you want protos to compile on every commit label Oct 26, 2026

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.

Pretty much LGTM.

// user is a single User these permissions apply to. Superseded by users:
// prefer users in new writers, and expect readers to ignore user when users
// is set.
User user = 1;

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.

Any reason to place these fields in 3, 2, 1 order?

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, I want to prefer users over user and eventually deprecate user, so in terms of humans reading it i want users to be more visible :)

@n0nick
Sagie Maoz (n0nick) merged commit f7ae4fd into main Oct 26, 2026
3 checks passed
@n0nick
Sagie Maoz (n0nick) deleted the sm/repeated-users branch October 26, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

protos-compiled safe to test committer is a member of this org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants