yii2-usuario
yii2-usuario copied to clipboard
Allow two chars and containing a / in the item name
What steps will reproduce the problem?
Try to use za or some/route/permissions as Permission name.
What is the expected result?
To be able to save the data.
What do you get instead?
A validation error.
Would be like this I think:
['name', 'match', 'pattern' => '/^[\w][\w-.:\/]?[\w]$/'],
here https://github.com/2amigos/yii2-usuario/blob/5de9e6470b41bd50011913ce38bd24f45e13d829/src/User/Model/AbstractAuthItem.php#L101
Can I create a PR for this or are there objections about it?
I've no objections in allowing /, but the proposed regexp doesn't seem to accept more than two characters for permission name.
Anyway go with the PR once fixed. thanks
So sorry I don't have time guys. Lately crypto projects take so much time for me. Thanks again for your work. Highly and very much appreciated.