404 for non-moderators

alt-html-css
Bob Mottram 2020-12-16 18:24:04 +00:00
parent 4c0e099056
commit 312d368028
2 changed files with 6 additions and 2 deletions

View File

@ -1879,7 +1879,7 @@ class PubServer(BaseHTTPRequestHandler):
# person options screen, Info button # person options screen, Info button
# See htmlPersonOptions # See htmlPersonOptions
if '&submitInfo=' in optionsConfirmParams: if '&submitPersonInfo=' in optionsConfirmParams:
if isModerator(self.server.baseDir, chooserNickname): if isModerator(self.server.baseDir, chooserNickname):
if debug: if debug:
print('Showing info for ' + optionsActor) print('Showing info for ' + optionsActor)
@ -1898,6 +1898,9 @@ class PubServer(BaseHTTPRequestHandler):
self._write(msg) self._write(msg)
self.server.POSTbusy = False self.server.POSTbusy = False
return return
else:
self._404()
return
# person options screen, snooze button # person options screen, snooze button
# See htmlPersonOptions # See htmlPersonOptions

View File

@ -229,7 +229,8 @@ def htmlPersonOptions(defaultTimeline: str,
if isModerator(baseDir, nickname): if isModerator(baseDir, nickname):
optionsStr += \ optionsStr += \
' <button type="submit" class="button" name="submitInfo">' + \ ' <button type="submit" class="button" ' + \
'name="submitPersonInfo">' + \
translate['Info'] + '</button>\n' translate['Info'] + '</button>\n'
personNotes = '' personNotes = ''