Hello,
I need to build custom Django user roles, and i need an advice on the best approach (or library that i can use) to achieve that:
There will be 3 different user levels:
Author
Editor
Verification
Every user must be limited to a city, based on custom field (New York, Berlin, Amsterdam, etc)
Only ‘Author’ can add content, while ‘Editor’ and ‘Verification’ can edit the content.
Author: Can only view/edit the content created by them.
Editor: Can only view/edit the content created by ‘Author’s in their cities.
Verification: Can only view/edit the content created by the ‘Editor’s in their cities.
Author: When creates content, should have the options to:
Save as draft
Send to Editor
Editor: When edits content, should have the options to:
Send back to Author
Send to Verification
Verification: When edits content, should have the options to:
Send back to the Editor
Mark as Verified.
Scenario:
An admin creates the following users:
Username | Role | City | Content titles written by the user
John | Author | New York | Test1, Test2, Test3
Sam | Author | New York | Test4, Test5, Test6
Kim | Author | Berlin | Test7, Test8, Test9
Adam | Editor | New York
Alex | Editor | Berlin
Stacey | Verification | New York
Anthony | Verification | Berlin
Based on the above scenario, the Authors below should be able to access only the titles they created; Additionally:
Adam: Should be able to view/edit the titles: Test1 - Test6 (Since they were written by 2 Authors in his City.
Alex: Should be able to view/edit the titles: Test7 - Test9 (Since they were written by Kim, which in his city)
The same applies for the Verification.
Finally, If Author sent the content to Editor, the Author should no longer be able to edit the content, until it’s sent back to him by the Editor.