diff --git a/opentech/apply/funds/templates/funds/applicationsubmission_detail.html b/opentech/apply/funds/templates/funds/applicationsubmission_detail.html index dd2cafc69700bb8f32868f7d73bb4d3e41207c4a..cb2a5197abb9eb45947716b98d599828db483004 100644 --- a/opentech/apply/funds/templates/funds/applicationsubmission_detail.html +++ b/opentech/apply/funds/templates/funds/applicationsubmission_detail.html @@ -32,7 +32,7 @@ <a class="tab__item" href="#activity-feed" data-tab="tab-3"> Activity Feed </a> - {% if request.user.is_superuser %} + {% if request.user.is_apply_staff %} <a class="tab__item tab__item--right js-tabs-off" href="{% url 'admin:activity_event_changelist' %}?submission__id={{ object.id }}"> View message log </a> diff --git a/opentech/apply/users/migrations/0008_add_staff_permissions.py b/opentech/apply/users/migrations/0008_add_staff_permissions.py new file mode 100644 index 0000000000000000000000000000000000000000..8f8f319cf60c75c6fd86eb19b1e34a843df37405 --- /dev/null +++ b/opentech/apply/users/migrations/0008_add_staff_permissions.py @@ -0,0 +1,22 @@ +# Generated by Django 2.0.9 on 2019-01-10 09:28 + +from django.contrib.auth.models import Group, Permission +from django.db import migrations + +from opentech.apply.users.groups import STAFF_GROUP_NAME + + +class Migration(migrations.Migration): + + def add_permissions(apps, schema_editor): + staff_group = Group.objects.get(name=STAFF_GROUP_NAME) + staff_add_perm = Permission.objects.get(name='Can change event') + staff_group.permissions.add(staff_add_perm) + + dependencies = [ + ('users', '0007_user_slack'), + ] + + operations = [ + migrations.RunPython(add_permissions) + ]