Skip to content
This repository has been archived by the owner on Oct 28, 2020. It is now read-only.

Commit

Permalink
Merge pull request #824 from johngian/1067147-council-permissions
Browse files Browse the repository at this point in the history
[Fix bug 1067147] Allow admins and council to change activities and camp...
  • Loading branch information
johngian committed Sep 25, 2014
2 parents 19998f5 + 1670d48 commit 68c7127
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions remo/base/content_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,45 @@
'',
url('^activities/$',
BaseListView.as_view(
groups=['Admin', 'Council'],
model=Activity, create_object_url=reverse_lazy('create_activity')),
name='list_activities'),
url('^activities/(?P<pk>\d+)/delete/$',
BaseDeleteView.as_view(
groups=['Admin', 'Council'],
model=Activity, success_url=reverse_lazy('list_activities')),
name='delete_activity'),
url('^activities/new/$',
BaseCreateView.as_view(
groups=['Admin', 'Council'],
model=Activity, form_class=ActivityForm,
success_url=reverse_lazy('list_activities')),
name='create_activity'),
url('^activities/(?P<pk>\d+)/edit/$',
BaseUpdateView.as_view(
groups=['Admin', 'Council'],
model=Activity, form_class=ActivityForm,
success_url=reverse_lazy('list_activities')),
name='edit_activity'),
url('^campaigns/$',
BaseListView.as_view(
groups=['Admin', 'Council'],
model=Campaign, create_object_url=reverse_lazy('create_campaign')),
name='list_campaigns'),
url('^campaigns/(?P<pk>\d+)/delete/$',
BaseDeleteView.as_view(
groups=['Admin', 'Council'],
model=Campaign, success_url=reverse_lazy('list_campaigns')),
name='delete_campaign'),
url('^campaigns/new/$',
BaseCreateView.as_view(
groups=['Admin', 'Council'],
model=Campaign, form_class=CampaignForm,
success_url=reverse_lazy('list_campaigns')),
name='create_campaign'),
url('^campaigns/(?P<pk>\d+)/edit/$',
BaseUpdateView.as_view(
groups=['Admin', 'Council'],
model=Campaign, form_class=CampaignForm,
success_url=reverse_lazy('list_campaigns')),
name='edit_campaign'),
Expand Down
8 changes: 4 additions & 4 deletions remo/base/templates/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ <h2>Content</h2>
<a href="{{ url('list_functional_areas') }}">Edit functional areas</a>
</p>
<p>
<a href="{{ url('list_activities') }}">Edit activities</a>
<a href="{{ url('list_event_goals') }}">Edit event goals</a>
</p>
{% endif %}
<p>
<a href="{{ url('list_campaigns') }}">Edit campaigns</a>
<a href="{{ url('list_activities') }}">Edit activities</a>
</p>
<p>
<a href="{{ url('list_event_goals') }}">Edit event goals</a>
<a href="{{ url('list_campaigns') }}">Edit campaigns</a>
</p>
{% endif %}
<p>
<a href="{{ url('list_metrics') }}">Edit event metrics</a>
</p>
Expand Down

0 comments on commit 68c7127

Please sign in to comment.