Skip to content

feat: PermissionsByVisibility - #12

Open
vknabel wants to merge 1 commit into
mainfrom
tokens
Open

vknabel wants to merge 1 commit into
mainfrom
tokens

Conversation

@vknabel

@vknabel vknabel commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

@vknabel vknabel changed the title feat: tokens feat: PermissionsByVisibility Sep 22, 2026
@vknabel
vknabel marked this pull request as ready for review September 22, 2026 11:39
Comment on lines +59 to +63
// IsTenantLogin returns true if name field satisfies our requirements.
optional bool is_tenant_login = 80048962 [(buf.validate.predefined).cel = {
id: "string.is_tenant_login"
message: "must be within 2 and 128 characters"
expression: "this.size() >= 2 && this.size() <= 128"

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.

Currently not used for validation yet. Do you want to use it somewhere?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

In #10 we just use is_name at the moment.

Comment on lines +120 to +131
// ProjectRolesKeysValid ensures that project roles keys met our requirements.
optional bool project_roles_keys_valid = 80068953 [(buf.validate.predefined).cel = {
id: "project_roles.key.valid"
message: "subject must be a '*', or a valid UUID"
expression: "this.all(k, k == '*' || k.matches('^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'))"
}];
// TenantRolesKeysValid ensures that tenant roles keys met our requirements.
optional bool tenant_roles_keys_valid = 80068954 [(buf.validate.predefined).cel = {
id: "tenant_roles.key.valid"
message: "subject must be '*' or between 2 and 128 characters"
expression: "this.all(k, k == '*' || this.size() >= 2 || this.size() <=128 )"
}];

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.

Same as above. Not used yet.

optional bool tenant_roles_keys_valid = 80068954 [(buf.validate.predefined).cel = {
id: "tenant_roles.key.valid"
message: "subject must be '*' or between 2 and 128 characters"
expression: "this.all(k, k == '*' || this.size() >= 2 || this.size() <=128 )"

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.

Suggested change
expression: "this.all(k, k == '*' || this.size() >= 2 || this.size() <=128 )"
expression: "this.all(k, k == '*' || k.size() >= 2 && k.size() <=128 )"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants