ng-security icon indicating copy to clipboard operation
ng-security copied to clipboard

Trim permission tokens (ng-if-permission)

Open pdorgambide opened this issue 7 years ago • 1 comments

A comma separated string could be writted with white spaces, at least in my case: ng-if-permission="ROLE_ADMINISTRADOR, ROLE_SUPERVISOR"

It is solved and made the code more robust using trim and split as: permissions = attrs.ngIfPermission.split(/[\s,]+/);

It would be applied to all cases.

pdorgambide avatar Apr 10 '17 15:04 pdorgambide

Oh Great! Can you please create a pull request with this refactoring? Thank you :)

ghost avatar Apr 10 '17 16:04 ghost