Add a proposal edit permission.
This commit is contained in:
parent
313ac788a4
commit
f15f878508
|
@ -29,15 +29,18 @@
|
|||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if perms.program.can_approve_proposals %}
|
||||
<a href="{% url 'backoffice:manage_proposals' camp_slug=camp.slug %}" class="list-group-item">
|
||||
<h4 class="list-group-item-heading">Manage Proposals</h4>
|
||||
<p class="list-group-item-text">Use this view to manage SpeakerProposals and EventProposals</p>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if user.is_superuser %}
|
||||
<a href="{% url 'backoffice:public_credit_names' camp_slug=camp.slug %}" class="list-group-item">
|
||||
<h4 class="list-group-item-heading">Approve Public Credit Names</h4>
|
||||
<p class="list-group-item-text">Use this view to check and approve users Public Credit Names</p>
|
||||
</a>
|
||||
<a href="{% url 'backoffice:manage_proposals' camp_slug=camp.slug %}" class="list-group-item">
|
||||
<h4 class="list-group-item-heading">Manage Proposals</h4>
|
||||
<p class="list-group-item-text">Use this view to manage SpeakerProposals and EventProposals</p>
|
||||
</a>
|
||||
<a href="{% url 'backoffice:merchandise_orders' camp_slug=camp.slug %}" class="list-group-item">
|
||||
<h4 class="list-group-item-heading">Merchandise Orders</h4>
|
||||
<p class="list-group-item-text">Use this view to look at Merchandise Orders</p>
|
||||
|
|
|
@ -23,6 +23,10 @@ class InfodeskMixin(CampViewMixin, PermissionRequiredMixin):
|
|||
permission_required = ("camps.infodesk_permission")
|
||||
|
||||
|
||||
class ContentTeamMixin(CampViewMixin, PermissionRequiredMixin):
|
||||
permission_required = ("program.can_approve_proposals")
|
||||
|
||||
|
||||
class BackofficeIndexView(InfodeskMixin, TemplateView):
|
||||
template_name = "index.html"
|
||||
|
||||
|
@ -78,7 +82,7 @@ class ApproveNamesView(BackofficeViewMixin, ListView):
|
|||
return Profile.objects.filter(public_credit_name_approved=False).exclude(public_credit_name='')
|
||||
|
||||
|
||||
class ManageProposalsView(BackofficeViewMixin, ListView):
|
||||
class ManageProposalsView(ContentTeamMixin, ListView):
|
||||
"""
|
||||
This view shows a list of pending SpeakerProposal and EventProposals.
|
||||
"""
|
||||
|
|
17
src/program/migrations/0067_auto_20180818_1634.py
Normal file
17
src/program/migrations/0067_auto_20180818_1634.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Generated by Django 2.1 on 2018-08-18 14:34
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('program', '0066_speaker_email'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='eventproposal',
|
||||
options={'permissions': (('can_approve_proposals', 'Can approve proposals'),)},
|
||||
),
|
||||
]
|
|
@ -311,6 +311,11 @@ class SpeakerProposal(UserSubmittedModel):
|
|||
class EventProposal(UserSubmittedModel):
|
||||
""" An event proposal """
|
||||
|
||||
class Meta:
|
||||
permissions = (
|
||||
("can_approve_proposals", "Can approve proposals"),
|
||||
)
|
||||
|
||||
track = models.ForeignKey(
|
||||
'program.EventTrack',
|
||||
related_name='eventproposals',
|
||||
|
|
Loading…
Reference in a new issue