Skip to content

Parse space and/or comma separated roles + tests#541

Open
Getslow6 wants to merge 1 commit into
redimp:mainfrom
Getslow6:Parse-space-separated-roles
Open

Parse space and/or comma separated roles + tests#541
Getslow6 wants to merge 1 commit into
redimp:mainfrom
Getslow6:Parse-space-separated-roles

Conversation

@Getslow6

Copy link
Copy Markdown
Contributor

In addition to comma separated roles, this change also allows space separated roles as this is being used by some authentication providers.

New functionality highlighted in green:

>>> _parse_roles("Admin,Dev,User")
{'ADMIN', 'DEV', 'USER'}
>>> _parse_roles("Admin, Dev, User")
{'ADMIN', 'DEV', 'USER'}
- >>> _parse_roles("Admin Dev User")
- {'ADMIN DEV USER'}
+ >>> _parse_roles("Admin Dev User")
+ {'ADMIN', 'DEV', 'USER'}

Tests have also been added and have been completed successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant