OpenMF
OpenMF copied to clipboard
[Backend] Added validation for user role while updating or creating user
Description
Now whenever a user is created or updated, we ensure that he can only have a role of admin, management or extractor.
Fixes #114
Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
How Has This Been Tested?
Try creating or updating a user.
Test Configuration:
- Postman
- Windows 10
Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules