mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-02 10:55:30 -04:00
Fix linter
This commit is contained in:
parent
7d6d3640ad
commit
e4587d36bc
@ -84,8 +84,8 @@ class AuthHandler < Kemal::Handler
|
||||
end
|
||||
if should_reject
|
||||
env.response.status_code = 403
|
||||
message = "HTTP 403: You are not authorized to visit #{env.request.path}"
|
||||
send_error_page
|
||||
send_error_page "HTTP 403: You are not authorized to visit " \
|
||||
"#{env.request.path}"
|
||||
return
|
||||
end
|
||||
end
|
||||
|
@ -1,5 +1,6 @@
|
||||
# Web related helper functions/macros
|
||||
|
||||
# This macro defines `is_admin` when used
|
||||
macro check_admin_access
|
||||
is_admin = false
|
||||
# The token (if exists) takes precedence over the default user option.
|
||||
@ -28,7 +29,8 @@ macro layout(name)
|
||||
end
|
||||
end
|
||||
|
||||
macro send_error_page
|
||||
macro send_error_page(msg)
|
||||
message = {{msg}}
|
||||
base_url = Config.current.base_url
|
||||
check_admin_access
|
||||
page = "Error"
|
||||
|
Loading…
x
Reference in New Issue
Block a user