diff options
author | Yorhel <git@yorhel.nl> | 2019-07-20 17:31:47 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2019-07-20 17:31:51 +0200 |
commit | 30c77700970890ea61053d67743f0b10fcf6150f (patch) | |
tree | 4b799c59d0da177cdedc41ee0436b405b08ad214 /lib | |
parent | 96ac31314c1d002b53aa20024e79580a5bd097f1 (diff) |
Make account deletion a Yorhel-only action
Not that I don't trust mods, but there's no accounting on this feature.
Limiting it to myself is easier than adding logging.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VNDB/Handler/Users.pm | 2 | ||||
-rw-r--r-- | lib/VNDB/Util/CommonHTML.pm | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/VNDB/Handler/Users.pm b/lib/VNDB/Handler/Users.pm index 875623a7..00f0d841 100644 --- a/lib/VNDB/Handler/Users.pm +++ b/lib/VNDB/Handler/Users.pm @@ -596,7 +596,7 @@ sub posts { sub delete { my($self, $uid, $act) = @_; - return $self->htmlDenied if !$self->authCan('usermod'); + return $self->htmlDenied if ($self->authInfo->{id}) != 2; # Yeah, yorhel-only function # rarely used admin function, won't really need translating diff --git a/lib/VNDB/Util/CommonHTML.pm b/lib/VNDB/Util/CommonHTML.pm index 1adb726b..7689b5f5 100644 --- a/lib/VNDB/Util/CommonHTML.pm +++ b/lib/VNDB/Util/CommonHTML.pm @@ -82,7 +82,7 @@ sub htmlMainTabs { end; } - if($type eq 'u' && $self->authCan('usermod')) { + if($type eq 'u' && ($self->authInfo->{id}||0) == 2) { li $sel eq 'del' ? (class => 'tabselected') : (); a href => "/$id/del", 'remove'; end; |