rdmo icon indicating copy to clipboard operation
rdmo copied to clipboard

`site` should be optional in rdmo.management.rules

Open jochenklar opened this issue 1 year ago • 1 comments

At one point we changed

{% test_rule 'management.can_view_management' request.user as can_view_management %}

to

{% test_rule 'management.can_view_management' request.user request.site as can_view_management %}

I think it should also work without the site for regular, one site instances. What do you think @MyPyDavid?

jochenklar avatar Feb 11 '24 18:02 jochenklar

yes, think it's fine. We have a custom version of the rdmo/core/templates/core/base_navigation.html in most cases anyways.

  • https://github.com/rdmorganiser/rdmo/blob/35a576b9c537a8355229dee4b55484cd997da441/rdmo/core/templates/core/base_navigation.html

MyPyDavid avatar Feb 14 '24 09:02 MyPyDavid

Is there still any reason for this change request? Regular single site instances also have SITE_ID = 1 anyways Would it require changes in the rules backend? please clarify or close it..

MyPyDavid avatar Aug 15 '24 08:08 MyPyDavid

I think it was because if non multi site folks work on the theme they can omit it. But they will copy paste it from the rdmo template anyway I guess.

jochenklar avatar Aug 15 '24 11:08 jochenklar