Drop KILL permission, just go with ADMIN

This commit is contained in:
XANTRONIX Development 2024-12-06 21:55:33 -05:00
parent 862794c8f5
commit 877b884097
2 changed files with 2 additions and 5 deletions

View file

@ -43,8 +43,7 @@ create table server_permission (
insert into server_permission values insert into server_permission values
(1, 'READ'), (1, 'READ'),
(2, 'POST'), (2, 'POST'),
(3, 'KILL'), (3, 'ADMIN');
(4, 'ADMIN');
create table server_user ( create table server_user (
id INTEGER PRIMARY KEY NOT NULL, id INTEGER PRIMARY KEY NOT NULL,

View file

@ -7,15 +7,13 @@ class UserPermission(enum.Flag):
NONE = 0 NONE = 0
READ = 1 READ = 1
POST = enum.auto() POST = enum.auto()
KILL = enum.auto()
ADMIN = enum.auto() ADMIN = enum.auto()
def __str__(self): def __str__(self):
return { return {
1: 'READ', 1: 'READ',
2: 'POST', 2: 'POST',
3: 'KILL', 3: 'ADMIN'
4: 'ADMIN'
}[self.value] }[self.value]
class User(DatabaseTable): class User(DatabaseTable):