diff --git a/stregsystem/migrations/0013_mobilepayment_permission_20201123_1344.py b/stregsystem/migrations/0013_mobilepayment_permission_20201123_1344.py new file mode 100644 index 00000000..dc425368 --- /dev/null +++ b/stregsystem/migrations/0013_mobilepayment_permission_20201123_1344.py @@ -0,0 +1,17 @@ +# Generated by Django 2.2.13 on 2020-11-23 12:44 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('stregsystem', '0012_mobilepayment'), + ] + + operations = [ + migrations.AlterModelOptions( + name='mobilepayment', + options={'permissions': (('mobilepaytool_access', 'MobilePaytool access'),)}, + ), + ] diff --git a/stregsystem/models.py b/stregsystem/models.py index 2db2430e..8ead975b 100644 --- a/stregsystem/models.py +++ b/stregsystem/models.py @@ -334,6 +334,10 @@ def delete(self, *args, **kwargs): class MobilePayment(models.Model): + class Meta: + permissions = ( + ("mobilepaytool_access", "MobilePaytool access"), + ) UNSET = 'U' APPROVED = 'A' IGNORED = 'I' diff --git a/stregsystem/templates/admin/index.html b/stregsystem/templates/admin/index.html index 4a65895f..0f929323 100644 --- a/stregsystem/templates/admin/index.html +++ b/stregsystem/templates/admin/index.html @@ -75,20 +75,23 @@ {% endif %} - {% if perms.stregsystem.import_batch_payments %} + {% if perms.stregsystem.import_batch_payments or perms.stregsystem.mobilepaytool_access %}
MobilePaytool | ||
---|---|---|
Multi-indbetaling |