Skip to content
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

IFC-761 Use flags to handle branch permissions #4601

Merged
merged 16 commits into from
Oct 15, 2024
Merged

Conversation

gmazoyer
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the group/backend Issue related to the backend (API Server, Git Agent) label Oct 10, 2024
@gmazoyer gmazoyer added the type/feature New feature or request label Oct 10, 2024
Copy link

codspeed-hq bot commented Oct 11, 2024

CodSpeed Performance Report

Merging #4601 will improve performances by 16.35%

Comparing gma-20241010-ifc761 (5b9fd80) with develop (bbc7d6f)

Summary

⚡ 1 improvements
✅ 9 untouched benchmarks

Benchmarks breakdown

Benchmark develop gma-20241010-ifc761 Change
test_get_menu 889.5 µs 764.5 µs +16.35%

@gmazoyer gmazoyer force-pushed the gma-20241010-ifc761 branch 7 times, most recently from d6f2bd4 to b7030e2 Compare October 14, 2024 17:08
@gmazoyer gmazoyer marked this pull request as ready for review October 14, 2024 17:08
@gmazoyer gmazoyer requested a review from a team October 14, 2024 17:09
@gmazoyer gmazoyer force-pushed the gma-20241010-ifc761 branch 2 times, most recently from 27fa034 to c6f6c7b Compare October 15, 2024 09:35
Copy link
Contributor

@ogenstad ogenstad left a comment

Choose a reason for hiding this comment

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

LGTM. Goes the ALLOW_ALL and ALLOW_OTHER work interchangeably within a non default branch now? I.e. if a user has either of those permissions an action would be allowed?

backend/infrahub/api/schema.py Outdated Show resolved Hide resolved
# What do we do if edit default branch global permission is set?
# if not restrict_changes:
# for key in permission_report:
# permission_report[key] |= PermissionDecisionFlag.ALLOW_DEFAULT
Copy link
Contributor

Choose a reason for hiding this comment

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

Can it be an argument to get_permission_report()?

For some reasons the issues on appear when we run tests in a row:
* backend/tests/unit/graphql/test_mutation_create.py::test_create_object_with_node_property
* backend/tests/unit/graphql/test_mutation_create.py::test_create_object_with_single_relationship_node_property
* backend/tests/unit/graphql/test_mutation_create.py::test_create_object_with_multiple_relationships_with_node_property

We should find a better fix for this.
@gmazoyer gmazoyer merged commit b7d26f5 into develop Oct 15, 2024
28 checks passed
@gmazoyer gmazoyer deleted the gma-20241010-ifc761 branch October 15, 2024 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group/backend Issue related to the backend (API Server, Git Agent) type/feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants