-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default permissions: Trainer + Tutor: (using own defined roles) : using pypi/django-permission + pypi/django-admin-view-permission #241
Comments
i'm not quite sure what you mean by
if by that you mean permissions defined by something like Permissions are currently checked in the corresponding views, either by annations such as if not (request.user.is_trainer or request.user.is_superuser):
return access_denied(request) Acces to files is also restricted in Yes, this is all somewhat messy. |
I thought about a permission setup , using "Permissions and Authorization" mentioned at https://docs.djangoproject.com/en/1.8/topics/auth/default/#permissions-and-authorization and https://docs.djangoproject.com/en/1.8/topics/auth/customizing/#custom-permissions so that a Praktomat-Admin could generate via Admin-Page new kind of user categories and can apply permissions to these without changing template or view code. That means: refactor view and template code to just obey "Permissions" and not (only) relay on ¶ |
For Django 1.8 and later there could be an interesting permission-Addon for using on praktomats admin-page: |
If we would define Permissions and relay on them, one could use Permissions like that:
Edit: Where solutionanalyst could be an own defined role or group, which should have access to admin-page and is only allowed to see and analyse all students uploads but is not tutor nor trainer nor superuser. |
In https://stackoverflow.com/a/52041938 there is an example given how "Groups" with "permissions" can be created via migrate. |
An other way for adding permissions while migrating is written here: |
writing data migrations is documented here : https://docs.djangoproject.com/en/1.11/topics/migrations/#data-migrations |
can somebody confirm, that there exists no active default permissions for Trainer + Tutor?
I think the following should be as default:
Trainer:
can create, delete or modify a task
can add, delete or modify a checker for a task
can add or exchange a "model solution" for a task
can create, delete or modify an attestation
can annotate a solutionfile
can modify or delete a annotation of a solutionfile
can watch solutions (befor timeover or run allcheckers)
Tutor:
can watch solutions (befor timeover or run allcheckers)
can annotate a solutionfile
can modify or delete a annotation of a solutionfile
But I am unsure about putting permissions from
accounts, admin, attestation, auth, checker, configuration,
contenttypes, sessions, solutions, tasks together
to archive my recomendet default permissions for trainer and tutor.
The text was updated successfully, but these errors were encountered: