Skip to content
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

Allow solution downloads for superusers #34

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

hannesbraun
Copy link
Contributor

This allows superusers to download solutions (e.g. to reproduce errors of the Praktomat). Otherwise, you'd need to add the trainer role to the superuser first in order to get access, which is mildly inconvenient.

Copy link
Contributor

@ifrh ifrh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me.
But it could differ from requirements given by local DSB.
(Could be, that admin is not allowed to see student solutions.)

Perhaps using django permissions and not testing roll flags could simplify code in that place.
On the other hand nowhere in Praktomat code permissions has been used so far (cf. KITPraktomatTeam/Praktomat#241 )

@hannesbraun
Copy link
Contributor Author

But it could differ from requirements given by local DSB.
(Could be, that admin is not allowed to see student solutions.)

I thought about that, too. But then, the status quo is that the superuser can already view all the content of a solution in the browser. So it he won't get access to data he wasn't able to access beforehand. Life is just getting easier. At least, that's my point of view ;)

Perhaps using django permissions and not testing roll flags could simplify code in that place.
On the other hand nowhere in Praktomat code permissions has been used so far (cf. KITPraktomatTeam/Praktomat#241 )

Maybe I can look into that at some point in the future... There are other places in the code base, where that might be useful as well. For now, I'd say it's fine.

@hannesbraun hannesbraun merged commit e8216d0 into master Sep 19, 2023
@hannesbraun hannesbraun deleted the allow-download-for-superuser branch September 19, 2023 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants