Added sql_delete routine to replace sql_modify with "DELETE FROM .." sql statement.
Fixed filter setup when a module has more than one filter.
Fixed filter setup for site,admin and webapi modes.
Added CMS_AUTH_FILTER, and check if user is already authenticated, then skip following auth filters.
Added specific webapi handler classes for root, user, access token, ...
Added user profile system to the core module.
Moved /user/{uid} from auth module to core module.
Added possibility to add html before and after a cms form. (useful to add a form before or after, as nested form are forbidden).
Now theme can be installed using roc install command.
48 lines
963 B
Plaintext
48 lines
963 B
Plaintext
note
|
|
description: "Summary description for {CMS_AUTHENTICATION_MODULE_WEBAPI}."
|
|
author: ""
|
|
date: "$Date$"
|
|
revision: "$Revision$"
|
|
|
|
class
|
|
CMS_AUTHENTICATION_MODULE_WEBAPI
|
|
|
|
inherit
|
|
CMS_MODULE_WEBAPI [CMS_AUTHENTICATION_MODULE]
|
|
redefine
|
|
permissions
|
|
end
|
|
|
|
create
|
|
make
|
|
|
|
feature -- Security
|
|
|
|
permissions: LIST [READABLE_STRING_8]
|
|
-- List of permission ids, used by this module, and declared.
|
|
do
|
|
Result := Precursor
|
|
Result.force ("admin users")
|
|
end
|
|
|
|
feature {NONE} -- Router/administration
|
|
|
|
setup_webapi_router (a_router: WSF_ROUTER; a_api: CMS_API)
|
|
-- <Precursor>
|
|
do
|
|
a_router.handle ("/info", create {WSF_URI_AGENT_HANDLER}.make (agent handle_info (?, ?, a_api)), a_router.methods_get)
|
|
end
|
|
|
|
feature -- Request handling
|
|
|
|
handle_info (req: WSF_REQUEST; res: WSF_RESPONSE; api: CMS_API)
|
|
local
|
|
m: WSF_HTML_PAGE_RESPONSE
|
|
do
|
|
create m.make
|
|
m.set_body ("{%"info%":%"" + api.setup.site_name + "%"}")
|
|
res.send (m)
|
|
end
|
|
|
|
end
|