mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-19 23:32:53 +00:00
* New settings? * New Settings page! * Vendor Inertia * Fix some issues * <Link>ify the site!
18 lines
462 B
Ruby
18 lines
462 B
Ruby
class Settings::AdminController < Settings::BaseController
|
|
before_action :require_admin_section_access
|
|
|
|
def show
|
|
render_settings_page(
|
|
active_section: "admin",
|
|
settings_update_path: my_settings_profile_path
|
|
)
|
|
end
|
|
|
|
private
|
|
|
|
def require_admin_section_access
|
|
unless current_user.admin_level.in?(%w[admin superadmin])
|
|
redirect_to my_settings_profile_path, alert: "You are not authorized to access this page"
|
|
end
|
|
end
|
|
end
|