clseibold / ZeroNet-Dev-Center

A Development Center for the ZeroNet. Tutorials on ZeroNet Zite Development, Collaboration, and Questions
http://127.0.0.1:43110/14pM9huTYzJdyQyHRj6v2kfhMe8DrxwpGt/
MIT License
2 stars 0 forks source link

User Permissions/Roles #4

Open ghost opened 7 years ago

ghost commented 7 years ago

I'm unsure how to do user roles/permissions. For example, I want to let some users be writers - they are allowed to write tutorials, some will be editors - they can only edit existing tutorials and not create new tutorials, etc. I'm not sure how I should setup the database for this, etc.

AnthyG commented 7 years ago

I think, the even bigger problem here is, if somebody isn't a writer, he will most probably still be able to create a new thing, and get it seeded, manually.. If I understand your issue correct... 😅

ghost commented 7 years ago

Good point. I didn't even think about that.

purplesyringa commented 6 years ago

You could create directories data/users - comments and data/writers. For data/users, you will set user_permissions in content.json. For data/writers, you can manually create directories data/writers/id and include those data/writers/id/content.jsons with signers in data/writers/content.json. For editors, you can add their signing keys to every signers field in data/writers/content.json.

AnthyG commented 6 years ago

@imachug did you actually do that for a zite of yours, if I may ask?

purplesyringa commented 6 years ago

I was trying to create StackOverflow for ZeroNet, and I used that technology there. Unfortunately, I was only learning how to use webpack back then, so I messed all my code and I didn't even add database support. But that would work.