Drop KILL permission, just go with ADMIN
This commit is contained in:
parent
862794c8f5
commit
877b884097
2 changed files with 2 additions and 5 deletions
|
@ -43,8 +43,7 @@ create table server_permission (
|
|||
insert into server_permission values
|
||||
(1, 'READ'),
|
||||
(2, 'POST'),
|
||||
(3, 'KILL'),
|
||||
(4, 'ADMIN');
|
||||
(3, 'ADMIN');
|
||||
|
||||
create table server_user (
|
||||
id INTEGER PRIMARY KEY NOT NULL,
|
||||
|
|
|
@ -7,15 +7,13 @@ class UserPermission(enum.Flag):
|
|||
NONE = 0
|
||||
READ = 1
|
||||
POST = enum.auto()
|
||||
KILL = enum.auto()
|
||||
ADMIN = enum.auto()
|
||||
|
||||
def __str__(self):
|
||||
return {
|
||||
1: 'READ',
|
||||
2: 'POST',
|
||||
3: 'KILL',
|
||||
4: 'ADMIN'
|
||||
3: 'ADMIN'
|
||||
}[self.value]
|
||||
|
||||
class User(DatabaseTable):
|
||||
|
|
Loading…
Add table
Reference in a new issue