You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to create a permission target with a repository and an include pattern; I have found out that the pattern can not be defined in the PermissionTarget.add_repository() function, but I had to set the pattern in the constructor of the permission target; I found it quite different from the UI experience on Artifactory, but it worked at least till September of this year.
Unfortunately it does not work anymore: when I create a new permission target, it comes out with no pattern at all, either if I pass it to the constructor or not: I mean that even the default ** include pattern is not set, which results to an useless permission target. Here is my code's snippet:
As workaround I have stopped using the PermissionTarget.add_repository() to add the repository to an existing permission target and instead I set both the repository and the include pattern when I create the permission template:
It works both with the library's version 0.9.1 and 0.9.2. Nevertheless it is just a workaround and I think that a properly documented solution is still needed.
I am now using the version 1.0.0 of the library and I can still see that the PermissionTarget.add_repository() and the PermissionTarget.remove_repository() functions do not support any other input parameter but the repository name, i.e. the includes_pattern and the excludes_pattern can not be set in these 2 function.
Reconsidering the issue now, I think that it makes sense that the includes_pattern and the excludes_pattern can not be set in these 2 function: they could be set in new dedicated functions.
Otherwise setting them in the constructor of the PermissionTarget, as I do in the snippet of my previous message, is a good solution. That snippet still works fine. You could update the documentation, so people know how to set the includes_pattern and the excludes_pattern.
I need to create a permission target with a repository and an include pattern; I have found out that the pattern can not be defined in the
PermissionTarget.add_repository()
function, but I had to set the pattern in the constructor of the permission target; I found it quite different from the UI experience on Artifactory, but it worked at least till September of this year.Unfortunately it does not work anymore: when I create a new permission target, it comes out with no pattern at all, either if I pass it to the constructor or not: I mean that even the default
**
include pattern is not set, which results to an useless permission target. Here is my code's snippet:I am using the latest version of the library, which is currently 0.9.1. Thanks in advance!
The text was updated successfully, but these errors were encountered: