From 8e7ad1375b89a122c234f052d6cb3f7e13664504 Mon Sep 17 00:00:00 2001
From: Valentin Rigal <rigal@teklia.com>
Date: Thu, 10 Dec 2020 10:53:55 +0100
Subject: [PATCH] Update models

---
 arkindex/dataimport/models.py | 4 ++++
 arkindex/documents/models.py  | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/arkindex/dataimport/models.py b/arkindex/dataimport/models.py
index 86545d7038..fe3077f40a 100644
--- a/arkindex/dataimport/models.py
+++ b/arkindex/dataimport/models.py
@@ -303,6 +303,10 @@ class Repository(models.Model):
     git_ref_revisions = models.ManyToManyField('dataimport.Revision', through='dataimport.GitRef')
     memberships = GenericRelation('users.Right', 'content_id')
 
+    ADMIN_LEVEL = 100
+    EXECUTE_LEVEL = 50
+    READ_LEVEL = 10
+
     class Meta:
         verbose_name_plural = 'repositories'
 
diff --git a/arkindex/documents/models.py b/arkindex/documents/models.py
index 599cf9e219..03be4a1717 100644
--- a/arkindex/documents/models.py
+++ b/arkindex/documents/models.py
@@ -52,6 +52,10 @@ class Corpus(IndexableModel):
     # Specific manager for ACL
     objects = CorpusManager()
 
+    ADMIN_LEVEL = 100
+    WRITE_LEVEL = 50
+    READ_LEVEL = 10
+
     class Meta:
         verbose_name_plural = 'corpora'
 
-- 
GitLab