Skip to content

feat: System api permission setting #3166

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 29, 2025
Merged

Conversation

shaohuzhang1
Copy link
Contributor

feat: System api permission setting

Copy link

f2c-ci-robot bot commented May 29, 2025

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link

f2c-ci-robot bot commented May 29, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment






def get_workspace_application_permission(self):
return lambda r, kwargs: Permission(group=self.value.group, operate=self.value.operate,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Your code appears to be well-formed and does not contain any immediate irregularities or obvious issues. However, here are a few general suggestions for improvement:

  1. Documentation Consistency: Ensure that all docstrings and comments follow consistent formatting guidelines. This can help make the code more readable and maintainable.

  2. Code Organization: The order of imports and class definitions looks appropriate, but consider organizing them further if needed. For example, placing common classes at the top and specific group-related constants near their use cases might improve readability.

  3. Variable Naming: While variable names like r and kwargs are short, they could be considered too generic unless there's a strong reason for their usage in that particular function. Using descriptive names would make the code easier to understand.

  4. Type Annotations: If applicable, adding type annotations (e.g., using mypy) can help ensure that variables and expected types are correctly defined, improving static typing checks.

  5. Permissions Management: The permission management part is organized well based on roles and groups. Consider whether each operation (read, edit, delete, create) should have a broader scope when considering system-wide capabilities rather than just individual resource operations.

Overall, your implementation has a solid structure and logical flow, making it ready for production use with minor adjustments for consistency and clarity.

@zhanweizhang7 zhanweizhang7 merged commit 1dadc06 into v2 May 29, 2025
3 of 5 checks passed
@zhanweizhang7 zhanweizhang7 deleted the pr@v2@feat_system_permission branch May 29, 2025 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants