mirror of
https://github.com/neocities/neocities.git
synced 2025-07-23 02:56:05 +02:00
further refinements to browse, fix broken test
This commit is contained in:
parent
18102eb76b
commit
4fc5698d0e
5 changed files with 50 additions and 51 deletions
|
@ -301,5 +301,9 @@ get '/admin/masquerade/:username' do
|
|||
end
|
||||
|
||||
def require_admin
|
||||
redirect '/' unless signed_in? && current_site.is_admin
|
||||
redirect '/' unless is_admin?
|
||||
end
|
||||
|
||||
def is_admin?
|
||||
signed_in? && current_site.is_admin
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue