Add parameter to pass in a list of Role names for use in export#295
Open
tim-d-blue wants to merge 4 commits into
Open
Add parameter to pass in a list of Role names for use in export#295tim-d-blue wants to merge 4 commits into
tim-d-blue wants to merge 4 commits into
Conversation
…roles can be used on serialization for a simpler means to combine roles on export
Member
|
I like the idea, but couldn't we repurpose the existing Something like: if isinstance(role, Role):
role = (role,)and then the rest of the code could just assume it's an iterable of roles. Btw, the if role and ((hasattr(role.function, "func_name") and
role.function.func_name == "whitelist")
or (hasattr(role.function, "__name__") and
role.function.__name__ == "whitelist")):can probably be simplified to: if role and role.function.__name__ == "whitelist" |
cc96316 to
26ae9f6
Compare
|
Any updates on this PR? |
Contributor
|
Needs to be refactored according to suggestions before pulling it in. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This provides a simpler method to combine multiple roles on export. Given a simple list of roles, when export is called a list of roles can be provided and the export will combine the roles and filter fields appropriately. Therefore dynamic role combination is available. Blacklist roles will override whitelist roles.