bihealth / sodar-core

SODAR Core: A Django-based framework for building scientific data management web apps
MIT License
9 stars 1 forks source link

Redundant permission check in project_detail.html template? #1438

Closed mikkonie closed 2 months ago

mikkonie commented 2 months ago

While working on something related to project_detail.html, I noticed we have a {% if can_view_project %} condition block which displays most of the template content based on user perms.

However, if the user lacks this perm we do not allow accessing the view to begin with, hence this template never gets rendered to begin with.

Hence it would seem this check is redundant and should be removed. Unless there is some very special case where we render the view regardless of perms. I'll have to double check..

mikkonie commented 2 months ago

This is never reached in test cases, so it must not be needed anymore. Refactoring..

mikkonie commented 2 months ago

Done.