open-metadata / OpenMetadata

OpenMetadata is a unified metadata platform for data discovery, data observability, and data governance powered by a central metadata repository, in-depth column level lineage, and seamless team collaboration.
https://open-metadata.org
Apache License 2.0
5.6k stars 1.05k forks source link

Test case owner should be able to edit incident details when he is test owner. #17948

Open mgorsk1 opened 2 months ago

mgorsk1 commented 2 months ago

Is your feature request related to a problem? Please describe. I want to create a policy that would enable prohibiting any changes to tests cases (and incidents regarding these test cases) to be done by test case owner.

Describe the solution you'd like Since test case already has an owner, I would like to be able to create policy that allows management of test cases and incidents based on test case ownership. Namely, this is the policy with set of rules I have now defined:

            {
                "name": "AllowTestCaseEdit1",
                "description": "Allow users to create test suites.",
                "effect": "allow",
                "operations": [
                    "EditTests",
                ],
                "resources": [
                    "All"
                ],
                "condition": "isOwner()"
            },
            {
                "name": "AllowTestCaseEdit2",
                "description": "Allow users to create test suites.",
                "effect": "allow",
                "operations": [
                    "EditAll", "Delete"
                ],
                "resources": [
                    "TestCase"
                ],
                "condition": "isOwner()"
            }

and I would like it to work in such way that:

Currently, such policy doesn't work and I get permission denied (user xyz doesn't have EditTests permission) when reassigning the incident linked to the test case owned by me (it works if i remove "condition": "isOwner()" part).

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

mgorsk1 commented 1 month ago

update on this - I think the issue might also be a discrepancy between how UI and Backend resolve permissions:

cc @TeddyCr