From 6f2eef0eb86c59688952361a3242c4d35267606a Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Thu, 27 Jun 2024 15:20:37 +0800 Subject: [PATCH] make role IDs into constants #226 --- app/cli.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/cli.py b/app/cli.py index cd35166d..d9124105 100644 --- a/app/cli.py +++ b/app/cli.py @@ -117,6 +117,8 @@ def register(app): print("Added 'Peertube Isolation' blocklist, see https://peertube_isolation.frama.io/") # Initial roles + # These roles will create rows in the 'role' table with IDs of 1,2,3,4. There are some constants (ROLE_*) in + # constants.py that will need to be updated if the role IDs ever change. anon_role = Role(name='Anonymous user', weight=0) anon_role.permissions.append(RolePermission(permission='register')) db.session.add(anon_role)