From ed1284c06dc734fdbccc31ca5a18a4b413164662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Kervella?= Date: Fri, 25 May 2018 20:10:31 +0000 Subject: [PATCH] Fix missing view_service_link perm --- .../migrations/0082_auto_20180525_2209.py | 19 +++++++++++++++++++ machines/models.py | 5 +++++ 2 files changed, 24 insertions(+) create mode 100644 machines/migrations/0082_auto_20180525_2209.py diff --git a/machines/migrations/0082_auto_20180525_2209.py b/machines/migrations/0082_auto_20180525_2209.py new file mode 100644 index 00000000..1da2370c --- /dev/null +++ b/machines/migrations/0082_auto_20180525_2209.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2018-05-25 20:09 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('machines', '0081_auto_20180521_1413'), + ] + + operations = [ + migrations.AlterModelOptions( + name='service_link', + options={'permissions': (('view_service_link', 'Peut voir un objet service_link'),)}, + ), + ] diff --git a/machines/models.py b/machines/models.py index fe1923bb..7027ca6f 100644 --- a/machines/models.py +++ b/machines/models.py @@ -1388,6 +1388,11 @@ class Service_link(RevMixin, AclMixin, models.Model): last_regen = models.DateTimeField(auto_now_add=True) asked_regen = models.BooleanField(default=False) + class Meta: + permissions = ( + ("view_service_link", "Peut voir un objet service_link"), + ) + def done_regen(self): """ Appellé lorsqu'un serveur a regénéré son service""" self.last_regen = timezone.now()