pytition / Pytition

Django app for self-hosted privacy-friendly online petitions
https://pytition.org
BSD 3-Clause "New" or "Revised" License
99 stars 28 forks source link

Add a setting for an instance oriented toward organizations (no user publishing) #227

Closed fallen closed 4 years ago

fallen commented 4 years ago

That could be the setting you would want for an instance reserved for an association / NGO / company / group where maybe you would not want individuals to create petitions in their own name but only in the name of the group.

This setting would change the behavior of the instance as follow:

This would possibly be used in addition with another setting that would restrict Organization creation to only admin (Django super-user) users. see #228

martinlehoux commented 4 years ago

As there are several issues requiring this king of editable settings, have you thought about how you prefer to implement this ? You are talking about instance wide settings, so I assume it would be ok to define a new Django setting. But is it really easy to set or unset, as you have to restart the server ? I think an other way would be to use a new model to handle these settings. Then settings can have a smaller range than instance wide (org wide for instance). But this for sure requires more work

Let me know, I would like to work on these two issues #227 and #228

fallen commented 4 years ago

That's a good question!

I would think that as a first step we can:

What's your opinion on this?

martinlehoux commented 4 years ago

Yes you're right. I think the line is whether you need a developper/sysadmin or just a regular user (maybe admin) to change the settings. Django settings are easy to change but need someone who has access to the server

martinlehoux commented 4 years ago

What should be the behavior when a user is denied access to a page ? Is there a redirection to home page with an error message ? Or a custom error page ?

fallen commented 4 years ago

Yes, something like that: https://github.com/pytition/Pytition/blob/master/pytition/petition/views.py#L247 Either redirect to your dashboard, or to what's best suited (like the previous page where you clicked an action which is erroneous)

fallen commented 4 years ago

Do you want me to assign you to both #227 and #228?

martinlehoux commented 4 years ago

Yes ! I think I will have time this week for both