lhermann / langify-docs

Documentation for the open translation system langify
4 stars 1 forks source link

Privileges #4

Open lhermann opened 7 years ago

lhermann commented 7 years ago

Before distributing titles, badges and reputation we need to define privileges.

Privileges are defined as can statements:

Then we should define user roles and match the privileges with the roles:

Then we think about the number of reputation points (and maybe other requirements) needed to advance in the user role. That ill make things easier in the long run and help us to keep a good overview.

One interesting question will be: What privileges does a new user have and what does he need in order to start translating.

dgilge commented 6 years ago

That sounds like a good workflow.

Permissions

Django calls it permissions. In general we have these permissions:

Models

We have to apply these (and other) permissions for every model object and user. These models are used currently:

Details

User

Permission User
view username everybody
view password nobody
view first and last name depends on user setting: everybody, Student, owner
view e-mail owner
view image everybody
view reputation owner, Moderator
view privileges everybody?
view contributions everybody
add anonymous user
change owner
change username admin
delete owner
history admin

System: ?

Privilege

Besides these permissions everybody can see how privileges are defined (but that's not important here).

Permission User
view admin
add Trustee
change admin
delete Trustee

Trustee because they can define the languages a work should be translated in to.

System: accessed indirectly

Trustee

Permission User
view everybody
add admin
change owner (members)
change code admin
delete owner (members)
history admin

System: object derived

Original work

Permission User
view everybody (except for private projects)
add owner (Trustee)
change owner (Trustee)
change abbreviation admin
delete owner (Trustee)
history everybody

System: object derived

Translated work

Permission User
view everybody (except for private projects)
add Initiator
change Initiator with Reviewer, Translator
change abbreviation admin
change release process Guardian
delete empty Initiator
delete almost empty Moderator
delete partial translated Trustee
history everybody

System: privilege derived

Author

Permission User
view everybody (except for private projects?)
add Trustee
change Trustee
delete Trustee
history admin

System: Trustee derived

Licence

Permission User
view everybody
add Trustee
change Trusteee
delete Trustee
history admin

System: Trustee derived

Release

Permission User
view everybody (except for private projects)
add Guardian
change Trustee
delete Trustee
history admin

System: privilege derived

Original section

Same as original work.

Translated section

Permission User
view Student (except for private projects)
add Contributor with Reviewer, Translator
change Contributor with Reviewer, Translator
delete Moderator
review Reviewer
amend Amender
history Student

System: privilege derived

Section draft

Permission User
view owner
add Contributor
change owner
delete owner
history owner

System: object derived

Reference

Permission User
view everybody (except for private projects?)
add ? Trustee
change Trustee
delete Trustee
history Trustee

System: Trustee derived

Issue

Permission User
view everybody (except for private projects)
add Contributor
change owner, Moderator
delete owner, Moderator

System: privilege, object derived

Comment

Same as issue.