Re: [Freeipa-devel] Sudorules user validation help

2015-05-28 Thread Drew Erny
Ok, so should I write a regex that matches that broader pattern, and only allow sudorules users to be added that follow those broader restrictions? On 05/28/2015 02:09 PM, Alexander Bokovoy wrote: On Thu, 28 May 2015, Martin Kosek wrote: On 05/28/2015 04:27 PM, Drew Erny wrote: In the ticket

Re: [Freeipa-devel] Sudorules user validation help

2015-05-28 Thread Alexander Bokovoy
On Thu, 28 May 2015, Martin Kosek wrote: On 05/28/2015 04:27 PM, Drew Erny wrote: In the ticket, however, it's stated that if the user wants to use any combination of weird characters, they should be able to. Would it be better to just define a function like def validate_username(username, igno

Re: [Freeipa-devel] Sudorules user validation help

2015-05-28 Thread Martin Kosek
On 05/28/2015 04:27 PM, Drew Erny wrote: > In the ticket, however, it's stated that if the user wants to use any > combination of weird characters, they should be able to. Would it be better to > just define a function like > > def validate_username(username, ignore_pattern=False): > > and have i

Re: [Freeipa-devel] Sudorules user validation help

2015-05-28 Thread Drew Erny
In the ticket, however, it's stated that if the user wants to use any combination of weird characters, they should be able to. Would it be better to just define a function like def validate_username(username, ignore_pattern=False): and have it ignore all username validation? On 05/28/2015 09:

Re: [Freeipa-devel] Sudorules user validation help

2015-05-28 Thread Drew Erny
OK, I see now what you mean by that. That is a simpler solution. I'll do it that way. On 05/28/2015 04:44 AM, Martin Kosek wrote: On 05/27/2015 08:41 PM, Drew Erny wrote: Hey, Freeipa-devel, I'm working on ticket #3226 (https://fedorahosted.org/freeipa/ticket/3226) I've identified the proble

Re: [Freeipa-devel] Sudorules user validation help

2015-05-28 Thread Martin Kosek
On 05/27/2015 08:41 PM, Drew Erny wrote: > Hey, Freeipa-devel, > > I'm working on ticket #3226 (https://fedorahosted.org/freeipa/ticket/3226) > > I've identified the problem. The sudorules add user command adds the user > validations at the end of it's pre-callback using add_external_pre_callback