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()