Rename 'active' to 'writable'
This commit is contained in:
parent
ea16a989f6
commit
ee1c98c82d
3 changed files with 6 additions and 6 deletions
|
@ -6,7 +6,7 @@ create table newsgroup (
|
|||
created_by TEXT NOT NULL,
|
||||
name TEXT NOT NULL,
|
||||
description TEXT NOT NULL,
|
||||
active BOOLEAN NOT NULL DEFAULT FALSE
|
||||
writable BOOLEAN NOT NULL DEFAULT FALSE
|
||||
);
|
||||
|
||||
create table message (
|
||||
|
|
|
@ -7,7 +7,7 @@ class Newsgroup(DatabaseTable):
|
|||
key = 'id'
|
||||
columns = (
|
||||
'id', 'created_on', 'created_by', 'name', 'description',
|
||||
'active'
|
||||
'writable'
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
|
@ -18,7 +18,7 @@ class Newsgroup(DatabaseTable):
|
|||
newsgroup.created_by = row['created_by']
|
||||
newsgroup.name = row['name']
|
||||
newsgroup.description = row['description']
|
||||
newsgroup.active = row['active']
|
||||
newsgroup.writable = row['writable']
|
||||
|
||||
return newsgroup
|
||||
|
||||
|
@ -28,5 +28,5 @@ class Newsgroup(DatabaseTable):
|
|||
self.created_by,
|
||||
self.name,
|
||||
self.description,
|
||||
self.active
|
||||
self.writable
|
||||
)
|
||||
|
|
|
@ -233,7 +233,7 @@ class Session():
|
|||
'min': row[1],
|
||||
'max': row[2],
|
||||
'name': newsgroup.name,
|
||||
'perms': 'y' if newsgroup.active else 'n'
|
||||
'perms': 'y' if newsgroup.writable else 'n'
|
||||
}
|
||||
|
||||
def _cmd_listgroup(self, *args):
|
||||
|
@ -709,7 +709,7 @@ class Session():
|
|||
for name in names:
|
||||
newsgroup = self.server.newsgroups.get(name)
|
||||
|
||||
if newsgroup is None or not newsgroup.active:
|
||||
if newsgroup is None or not newsgroup.writable:
|
||||
return ResponseCode.NNTP_POST_PROHIBITED
|
||||
|
||||
newsgroups.append(self.server.newsgroups[name])
|
||||
|
|
Loading…
Add table
Reference in a new issue