fix(rbac): handle preexisting policies and grouping policies #1
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.
Here is the PR for handling the preexisting policies and grouping policies. I have done some manual testing of it, just double check behind me in case I missed anything.
All this really does is adds the preexisting policies and group policies to their respective tables with the 'legacy' source. I didn't implement any additional checks for the 'REST API'.
About what we talked about earlier, I think the following should be fine:
'legacy': should be updated by anything,
'config': should be only updated through the config (maybe the REST API?)
'csv': should only be updated through the csv file
'rest': should only be updated through the REST API
'default': saving for a special case, possibly to do with super admins
Let me know what you think.