note description: "Handler to process CMS installation process." date: "$Date$" revision: "$Revision$" class CMS_ADMIN_INSTALL_HANDLER inherit CMS_HANDLER WSF_URI_HANDLER rename new_mapping as new_uri_mapping end WSF_RESOURCE_HANDLER_HELPER redefine do_get end CMS_ACCESS REFACTORING_HELPER create make feature -- execute execute (req: WSF_REQUEST; res: WSF_RESPONSE) -- Execute request handler do execute_methods (req, res) end feature -- HTTP Methods do_get (req: WSF_REQUEST; res: WSF_RESPONSE) -- local r: CMS_RESPONSE l_module: CMS_MODULE s: STRING lst: ARRAYED_LIST [CMS_MODULE] l_access: detachable READABLE_STRING_8 l_denied: BOOLEAN l_is_fresh_installation: BOOLEAN do l_is_fresh_installation := api.enabled_modules.count <= 1 --| Should have at least the required Core module! --| FIXME: improve the installer. create {GENERIC_VIEW_CMS_RESPONSE} r.make (req, res, api) l_access := api.setup.string_8_item ("admin.installation_access") if l_access = Void then l_access := api.setup.string_8_item ("administration.installation_access") end if l_access /= Void then if l_access.is_case_insensitive_equal ("none") then l_denied := True elseif l_access.is_case_insensitive_equal ("permission") then l_denied := not r.has_permission ("install modules") end else l_denied := True end if l_denied then send_custom_access_denied ("You do not have permission to access CMS installation procedure!", Void, req, res) else create s.make_empty s.append ("

Informations

") s.append ("") s.append ("

Modules

") s.append ("
Back to the " + r.link ("Administration", api.administration_path (Void), Void) + " ...
") r.set_main_content (s) if l_is_fresh_installation then r.set_title (r.translation ("New installation ...", Void)) else r.set_title (r.translation ("Update installation ...", Void)) end r.execute end end note copyright: "2011-2020, Jocelyn Fiat, Javier Velilla, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" end