RSDK-14414 Add UserPermission list to AuthConfig - #885
Open
Benjamin Rewis (benjirewis) wants to merge 4 commits into
Open
RSDK-14414 Add UserPermission list to AuthConfig#885Benjamin Rewis (benjirewis) wants to merge 4 commits into
UserPermission list to AuthConfig#885Benjamin Rewis (benjirewis) wants to merge 4 commits into
Conversation
Benjamin Rewis (benjirewis)
force-pushed
the
perms
branch
from
August 12, 2026 21:06
7104128 to
34ee7d1
Compare
UserPermission list to AuthConfig
Benjamin Rewis (benjirewis)
requested review from
Daniel Botros (danielbotros) and
Josh Matthews (jmatth)
August 13, 2026 14:06
Josh Matthews (jmatth)
approved these changes
Aug 14, 2026
|
|
||
| // A User describes a single user that a set of Permissions applies to. | ||
| message User { | ||
| // type is the type of user. Can be "api-key-id", "email", or "default". |
There was a problem hiding this comment.
If this is a known set should it be an enum instead of stringly typed?
Could also do a oneof but the code that generates has a kind of disguisting level of nesting:
Oneof with sub messages
message UserPermission {
repeated Permission permissions = 1;
message EmailUser {
string email = 1;
}
message APIKeyUser {
string key = 1;
}
message DefaultUser {}
// user is the User this UserPermission applies to. A User can only be
// listed in a single UserPermission for a set of UserPermissions.
oneof user {
EmailUser email = 2;
APIKeyUser api = 3;
DefaultUser default = 4;
}
}
func test() {
up := UserPermission{
User: &UserPermission_Api{
Api: &UserPermission_APIKeyUser{
Key: "",
},
},
}
}
Some of that nesting can be removed by not defining custom messages but that would make it annoying to update if the api case needed extra fields in the future or something:
Oneof with a level of nesting removed
message UserPermission {
repeated Permission permissions = 1;
// user is the User this UserPermission applies to. A User can only be
// listed in a single UserPermission for a set of UserPermissions.
oneof user {
string email = 2;
string api = 3;
google.protobuf.Empty default = 4;
}
}
func test() {
up := UserPermission{
User: &UserPermission_Api{
Api: "",
},
}
}
I really want oneof to be useful but enum is probably good enough.
Josh Matthews (jmatth)
requested changes
Aug 14, 2026
Josh Matthews (jmatth)
left a comment
Member
There was a problem hiding this comment.
Sorry, wrong button on that last one
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RSDK-14414
Adds the API specified in the scope.