shivsharma07 / django-survey

Automatically exported from code.google.com/p/django-survey
0 stars 0 forks source link

Allow permissions for who can edit a survey to include groups, not just users. #27

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Right now you have surveys editable by the owner and a list of users. It would 
be really 
convenient if you could permit them to a group as well. I make surveys and have 
a group of 
users that I want to permit to edit them.

Of course, this would be really nice if we had row level permissions instead to 
handle this.

Basically the change I am after would add a new field to the model like:

editable_by_group = models.ForeignKey(Group)

and then in the 'editable_survey_list()' view, an additional Q clause:

'queryset': Survey.objects.filter(Q(created_by=login_user) |
                                            Q(editable_by=login_user | Q(editable_by_group__in = 
login_user.groups.all())),

Original issue reported on code.google.com by scan...@gmail.com on 24 Oct 2008 at 9:42

GoogleCodeExporter commented 8 years ago
Hello Scanner,
I understand the concept there and in the past I have implemented this 
modification
on a private branch of django-survey. This being said I do not believe that this
enhancement should be in the realm of this reusable apps.
I would prefer to see this capability encapsulated in another reusable apps, 
like
django-tagging for tagging.
If you disagree with this please bring the discussion on django-survey google 
group.

--yml

Original comment by yann.ma...@gmail.com on 26 Oct 2008 at 5:59

GoogleCodeExporter commented 8 years ago

Original comment by yann.ma...@gmail.com on 30 Oct 2008 at 1:38