mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
make role IDs into constants #226
This commit is contained in:
parent
8548f3e2a2
commit
6f2eef0eb8
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue