-
Notifications
You must be signed in to change notification settings - Fork 1
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
Permission update #46
Conversation
…e display name to resourceSegment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting a PR. Make sure you have looked at the contribution guidelines. Also, look for quick check/tests operations that you can run locally for early verification of errors. Travis will be happier if it doesn't need to run too many times with problematic code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure that all tests and checks pass in the CI.
Also, add at least 1 test that demonstrates and validates the new feature, so we can get a better understanding of what is expected, and to make sure that future updates don't break it either.
An example in https://github.com/Ouranosinc/cowbird/blob/master/config/config.example.yml (with a few comments for each step/new field) would be needed to indicate and explain this new capability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Along with the changes required by @fmigneault (tests and config example update), the doc found in configuration.rst
might be needing an update too.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #46 +/- ##
==========================================
+ Coverage 87.57% 87.76% +0.19%
==========================================
Files 40 40
Lines 3211 3245 +34
Branches 471 480 +9
==========================================
+ Hits 2812 2848 +36
+ Misses 278 276 -2
Partials 121 121 ☔ View full report in Codecov by Sentry. |
…t for permission sync
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good for me, nice job!
field
andregex
to be used in thesync_permissions
section found in the config.This allows to sync permissions using a field other than
resource_full_name
when creating thename:type
from the segment
ex.: /field1::type1/field2::type2
. Adds support to useresource_display_name
.regex
is used to extract the desired information from thenametype_path
. It should be used to do anexact match. This new search overrides the default way of matching each segment with the
nametype_path
.In the case where a
regex
is found in the target segment, the data will be formed using the sameresource_type
for every match in the same segment. Similary, as using
- name: "**"
in the config to match multiple segment,it is possible to use a
regex
to match multiple resources in the same segment withregex: '(?<=:).*\/?(?=\/)'