From 877b8840975f525f9e30dcab4707233925666f22 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Fri, 6 Dec 2024 21:55:33 -0500 Subject: [PATCH] Drop KILL permission, just go with ADMIN --- db/newsgroup.sql | 3 +-- lib/nntp/tiny/user.py | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/db/newsgroup.sql b/db/newsgroup.sql index cdbc123..a921c3a 100644 --- a/db/newsgroup.sql +++ b/db/newsgroup.sql @@ -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, diff --git a/lib/nntp/tiny/user.py b/lib/nntp/tiny/user.py index 8fdfd5f..35c49a2 100644 --- a/lib/nntp/tiny/user.py +++ b/lib/nntp/tiny/user.py @@ -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):