Re: Issue with RegEx for project roles in Matrix Authorization Strategy Plugin

2017-07-13 Thread Artur Szostak
Looks like you might be confusing a glob with a regex. You probably want: (parent/project/component)|(parent/project/component/.*) From: jenkinsci-users@googlegroups.com on behalf of Raj Kiran Neerukonda

Re: Issue with RegEx for project roles in Matrix Authorization Strategy Plugin

2017-07-12 Thread Prachi Khadke
Hi Okay I found a workaround: https://issues.jenkins-ci.org/browse/JENKINS-19934?focusedCommentId=219352=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-219352 Regards Prachi On Wednesday, July 12, 2017 at 1:12:22 PM UTC-4, Prachi Khadke wrote: > > Hi Raj Kiran > >

Re: Issue with RegEx for project roles in Matrix Authorization Strategy Plugin

2017-07-12 Thread Prachi Khadke
Hi Raj Kiran Did you find a solution to your problem? I have the same issue. Need to figure out the correct regex for project level role based access control. Regards Prachi On Monday, July 10, 2017 at 3:24:07 AM UTC-4, Raj Kiran Neerukonda wrote: > > Hello, > > I am having similar problem.

Re: Issue with RegEx for project roles in Matrix Authorization Strategy Plugin

2017-07-10 Thread Raj Kiran Neerukonda
Hello, I am having similar problem. Right now i am having multiple directories, i need to control access to sub directories. For example, i have component specific jenkins jobs in parent/project/component/* How can i configure this pattern in role base authentication? I tried giving

Re: Issue with RegEx for project roles in Matrix Authorization Strategy Plugin

2014-09-22 Thread Jan Seidel
X(?!Y) works when it is used in a RegEx but the plugins botches as soon as you start to combine several negations. X(?!Y)|A(!?B) won't behave as expected. Applying the de Morgan's law (double negation to create and AND from an OR) does not interest the plugin at all. I tried (!?(X(?!Y)|A(!?B)),

Re: Issue with RegEx for project roles in Matrix Authorization Strategy Plugin

2014-09-22 Thread Jan Seidel
GUIDE_(?!MIB)(FOO|BAR|BAZ)(?!P4)$ is a nice idea. I have been working with it quite at the beginning of my test cases but I neglected ^ and $. This may be the hint I needed to anchor the parttern. :) Cheers Am Freitag, 19. September 2014 12:20:49 UTC+2 schrieb Gunnar Strand: On 09/19/14

Re: Issue with RegEx for project roles in Matrix Authorization Strategy Plugin

2014-09-22 Thread Jan Seidel
Nice advice! :) what does *?:* actually imply? Where do I find this information? If you want to allow that MIB can appear anywhere else other that immmediately after GUIDE_ you can change the regex for : (.*)GUIDE_(?!MIB)((?!P4).)*$ This pattern confuses me a bit... Ohh now I get it.

Re: Issue with RegEx for project roles in Matrix Authorization Strategy Plugin

2014-09-22 Thread Jan Seidel
It works like a charm :) Thank you two for helping me out on this one. Jan Am Freitag, 19. September 2014 09:38:17 UTC+2 schrieb Jan Seidel: Hi all, I have a weird issue with a regular expression. Hopefully you can help me out here. I have a RegEx like *(.*)GUIDE_(?!MIB)(.*)(?!P4)* It

Re: Issue with RegEx for project roles in Matrix Authorization Strategy Plugin

2014-09-22 Thread Jan Seidel
Last but not least. Looks like Jenkins adheres to Java Regex, even if I sometimes doubted it. (?:*X*) *X*, as a non-capturing groupDoes this mean ... don't jump on this pattern? Sorry, I'm no developer :) -- You received this message because you are subscribed to the Google Groups Jenkins

Re: Issue with RegEx for project roles in Matrix Authorization Strategy Plugin

2014-09-22 Thread Richard Lavoie
What ( ) does is that whenever it matches the inner pattern, it keeps it in memory for further reference in code. (?: ) allows to have a complex inner pattern with OR cases without keeping the matched content in memory. That's what mean non-capturing for (?:). Also

Re: Issue with RegEx for project roles in Matrix Authorization Strategy Plugin

2014-09-22 Thread Jan Seidel
Thanks for the explanation :) The site you have mentioned is indeed a real nice one. It is already added to my bookmarks. Cheers Jan -- You received this message because you are subscribed to the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from

Issue with RegEx for project roles in Matrix Authorization Strategy Plugin

2014-09-19 Thread Jan Seidel
Hi all, I have a weird issue with a regular expression. Hopefully you can help me out here. I have a RegEx like *(.*)GUIDE_(?!MIB)(.*)(?!P4)* It should, as far as I can tell, list all jobs containing GUIDE but exclude GUIDE jobs with a MIB in the middle or P4 at the end of the project name,

Re: Issue with RegEx for project roles in Matrix Authorization Strategy Plugin

2014-09-19 Thread Gunnar Strand
Hi Jan, On 09/19/14 09:38, Jan Seidel wrote: Hi all, I have a weird issue with a regular expression. Hopefully you can help me out here. I have a RegEx like *(.*)GUIDE_(?!MIB)(.*)(?!P4)* It should, as far as I can tell, list all jobs containing GUIDE but exclude GUIDE jobs with a MIB in the

Re: Issue with RegEx for project roles in Matrix Authorization Strategy Plugin

2014-09-19 Thread Gunnar Strand
Hi, I did of course not read the subject. Shame on me. The answer below is for regex in general, not sure how applicable it is to the Matrix Authorization Strategy Plugin (not using it). BR Gunnar On 09/19/14 09:57, Gunnar Strand wrote: Hi Jan, On 09/19/14 09:38, Jan Seidel wrote: Hi

Re: Issue with RegEx for project roles in Matrix Authorization Strategy Plugin

2014-09-19 Thread Jan Seidel
True (.*) is very greedy, but (?!P4) is a but not P4 and I would expect it to work. It isn't as I just figured out in a test run with a completely different RegEx to skim for other jobs :/ I got to tweak it and create a set of project rules and then combine them for each user depending on what

Re: Issue with RegEx for project roles in Matrix Authorization Strategy Plugin

2014-09-19 Thread Jan Seidel
Yay, got it. A set of projects rules. each one containing a positve match and then combine the rule works well. One odd thing I learned is, that you don't need wildcards if your match has a trailing string. e.g. *MB**_GUIDE**_Pxxx_P4**_DELIVERY* will also be found when you work with

Re: Issue with RegEx for project roles in Matrix Authorization Strategy Plugin

2014-09-19 Thread Gunnar Strand
On 09/19/14 11:27, Jan Seidel wrote: True (.*) is very greedy, but (?!P4) is a but not P4 and I would expect it to work. It isn't as I just figured out in a test run with a completely different RegEx to skim for other jobs :/ I don't know what kind of regex the Matrix supports, but X(?!Y)

Re: Issue with RegEx for project roles in Matrix Authorization Strategy Plugin

2014-09-19 Thread Gunnar Strand
On 09/19/14 11:44, Jan Seidel wrote: Yay, got it. A set of projects rules. each one containing a positve match and then combine the rule works well. One odd thing I learned is, that you don't need wildcards if your match has a trailing string. e.g. *MB**_GUIDE**_Pxxx_P4**_DELIVERY*

Re: Issue with RegEx for project roles in Matrix Authorization Strategy Plugin

2014-09-19 Thread Richard Lavoie
As a few people already mentioned you need to anchor your pattern. Otherwise, .* might match what you want to exclude and attempt the match after it, resulting in an unwanted result. What your regx is doing in words is this: (.*) match anywhere GUIDE_ : normal text match (?!MIB) : immediately