Too easy to not just do this now
This commit is contained in:
parent
f2255f8207
commit
ae73969320
|
@ -41,7 +41,6 @@ Run the tests locally (against development environment):
|
|||
### (Lord knows there's TODOs I could be working on...)
|
||||
|
||||
1. RSS feed!!
|
||||
1. Log user out if locked out? Will need to check `lock_status()` beyond just logging in
|
||||
1. Support at least some Markdown, specifically the code blocks
|
||||
1. Implement tripcodes (moving this down in priority due to complexity...)
|
||||
1. Return a text response instead of HTML if a `.txt` extension [is
|
||||
|
|
|
@ -52,7 +52,7 @@ sub startup($self) {
|
|||
|
||||
$self->helper(is_mod => sub ($c) {
|
||||
if (my $mod_id = $c->session->{'mod_id'}) {
|
||||
return 1 if $mod_id =~ /\d+/
|
||||
return 1 unless $c->moderator->lock_status($mod_id)
|
||||
}
|
||||
|
||||
return undef;
|
||||
|
|
|
@ -45,6 +45,14 @@ sub lock_out($self, $mod_id) {
|
|||
END_SQL
|
||||
}
|
||||
|
||||
sub unlock($self, $mod_id) {
|
||||
$self->pg->db->query(<<~'END_SQL', $mod_id)
|
||||
UPDATE moderators
|
||||
SET lock_status = FALSE
|
||||
WHERE moderator_id = ?;
|
||||
END_SQL
|
||||
}
|
||||
|
||||
sub get_id($self, $email) {
|
||||
$self->pg->db->query(<<~'END_SQL', $email)->hash->{'moderator_id'}
|
||||
SELECT moderator_id
|
||||
|
|
Loading…
Reference in New Issue
Block a user