Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

refactor: clean up policy.rego#20366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
aslilac merged 12 commits intomainfromlilac/policy-refactor
Oct 27, 2025
Merged

refactor: clean up policy.rego#20366

aslilac merged 12 commits intomainfromlilac/policy-refactor
Oct 27, 2025

Conversation

@aslilac
Copy link
Member

@aslilacaslilac commentedOct 17, 2025
edited
Loading

I found some of the naming and organization of this file to be really confusing/overwhelming at first. I'm hoping that by rearranging a couple of things, renaming some variables, and rewriting some comments that I can make it less intimidating for the next person who needs to dive in to this policy. 😄

  • Fixed a bunch of lints
  • Ran things through the code formatter
  • Moved utilities to the end to put more focus on the actual policy
  • Improved some names (hopefully)
  • Moved the chunk of documentation from a comment at the top into a markdown file, and replaced it with a comment telling you to go read the new docs

This is all a bunch of stuff I wanted to do while adding the org member level, but I felt like it cluttered the diff too much, making it unclear what was just being shuffled around vs what was actually meaningfully changing. Once this is merged, the org member code should slot in very nicely, with a much smaller diff.

This whole PR should essentially be a no-op! Anything that looks like it's changing behavior is unintentional. This change is meant to be purely for the benefit of future readers.

@aslilacaslilac requested a review fromEmyrkOctober 17, 2025 20:00
@github-actionsgithub-actionsbot added the staleThis issue is like stale bread. labelOct 25, 2025
Copy link
Member

@EmyrkEmyrk left a comment

Choose a reason for hiding this comment

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

👍

- 1 to allow

If a level abstains, then the decision gets deferred to the next level. When
there is no "next" level to defer to it is equivalent to being denied.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
there is no "next" level to defer to it is equivalent to being denied.
there is no "next" level to defer to, it is equivalent to being denied.

there is no "next" level to defer to it is equivalent to being denied.

###Scope
Additionally, each input has a "scope" that can be thought of as a second set of permissions, where each permission belongs to one of the four levels–exactly the same as role permissions. An action is only allowed if it is allowed by both the subject's permissions_and_ their current scope. This is to allow issuing tokens for a subject that have a subset of the full subjects permissions.
Copy link
Member

Choose a reason for hiding this comment

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

Should this be a comma?

Suggested change
Additionally, each input has a "scope" that can be thought of as a second set of permissions, where each permission belongs to one of the four levelsexactly the same as role permissions. An action is only allowed if it is allowed by both the subject's permissions_and_ their current scope. This is to allow issuing tokens for a subject that have a subset of the full subjects permissions.
Additionally, each input has a "scope" that can be thought of as a second set of permissions, where each permission belongs to one of the four levels,exactly the same as role permissions. An action is only allowed if it is allowed by both the subject's permissions_and_ their current scope. This is to allow issuing tokens for a subject that have a subset of the full subjects permissions.

@aslilacaslilac merged commitd9c40d6 intomainOct 27, 2025
31 checks passed
@aslilacaslilac deleted the lilac/policy-refactor branchOctober 27, 2025 16:01
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsOct 27, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@EmyrkEmyrkEmyrk approved these changes

Assignees

@aslilacaslilac

Labels

staleThis issue is like stale bread.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@aslilac@Emyrk

[8]ページ先頭

©2009-2025 Movatter.jp