Skip to content

Fix perforce permissions interpretation for rules where there is a wildcard in the depot name

Warren Gifford requested to merge mlw-fix-sub-repo-perms-test-failure into main

Created by: mollylogue

Issues arise with rules like //A/.../C/foo/bar/etc when the specified depot is //A/B/C/. The rule ends up being A/**/C/foo/bar/etc, when in reality it should strip out the part that matches the depot and be something like foo/bar/etc.

This PR aims to detect this particular case and adjust the rules accordingly. There's definitely still some cleanup needed and more tests that should be added.

WIP

Test plan

Existing and new unit tests should pass Locally generate permissions using this new code, and test that we can view/not view the code we'd expect.

Merge request reports

Loading