Move libraries layout', model', `peristence' under cms folder

Updated code to the new layout.
Added missing comments.
Remove /example/api
This commit is contained in:
jvelilla
2014-11-12 17:24:34 -03:00
parent a576c38d42
commit 789b26eafa
146 changed files with 47 additions and 10343 deletions

View File

@@ -19,13 +19,19 @@ feature -- Hook
hook_auto_register (a_response: CMS_RESPONSE)
do
if attached {CMS_HOOK_MENU_ALTER} Current as h_menu_alter then
a_response.add_menu_alter_hook (h_menu_alter)
debug ("refactor_fixme")
-- Fixme: CMS_RESPONSE.add_menu_alter_hook : a_response.add_menu_alter_hook (h_menu_alter)
end
end
if attached {CMS_HOOK_BLOCK} Current as h_block then
a_response.add_block_hook (h_block)
debug ("refactor_fixme")
-- Fixme: CMS_RESPONSE.add_block_hook a_response.add_block_hook (h_block)
end
end
if attached {CMS_HOOK_FORM_ALTER} Current as h_block then
a_response.add_form_alter_hook (h_block)
debug ("refactor_fixme")
-- CMS_RESPONSE.add_form_alter_hook a_response.add_form_alter_hook (h_block)
end
end
end

View File

@@ -1,5 +1,5 @@
note
description: "Summary description for {BASIC_AUTH_MODULE}."
description: "This module allows the use of HTTP Basic Authentication to restrict access by looking up users in the given providers."
date: "$Date$"
revision: "$Revision$"

View File

@@ -1,6 +1,5 @@
note
description: "Summary description for {BASIC_AUTH_FILTER}."
author: ""
description: "Processes a HTTP request's BASIC authorization headers, putting the result into the execution variable user."
date: "$Date$"
revision: "$Revision$"
@@ -19,7 +18,7 @@ create
feature -- Basic operations
execute (req: WSF_REQUEST; res: WSF_RESPONSE)
-- Execute the filter
-- Execute the filter.
local
l_auth: HTTP_AUTHORIZATION
do
@@ -33,10 +32,17 @@ feature -- Basic operations
attached l_auth.login as l_auth_login and then attached l_auth.password as l_auth_password then
if api.is_valid_credential (l_auth_login, l_auth_password) then
if attached api.user_by_name (l_auth_login) as l_user then
debug ("refactor_fixme")
fixme ("Maybe we need to store in the credentials in a shared context SECURITY_CONTEXT")
-- req.set_execution_variable ("security_content", create SECURITY_CONTEXT.make (l_user))
-- other authentication filters (OpenID, etc) should implement the same approach.
end
req.set_execution_variable ("user", l_user)
execute_next (req, res)
else
-- Internal server error
debug ("refactor_fixme")
to_implement ("Internal server error")
end
end
else
log.write_error (generator + ".execute login_valid failed for: " + l_auth_login )

View File

@@ -1,22 +1,31 @@
note
description: "Summary description for {WSF_CMS_MODULE}."
description: "Describe module features that adds one or more features to your web site."
date: "$Date$"
revision: "$Revision$"
deferred class
CMS_MODULE
inherit
REFACTORING_HELPER
feature -- Access
is_enabled: BOOLEAN
-- Is the module enabled?
name: STRING
-- Name of the module.
description: STRING
-- Description of the module.
package: STRING
--
version: STRING
-- Version od the module?
feature -- Router
@@ -48,21 +57,29 @@ feature -- Filter
feature -- Settings
enable
-- enable the module.
do
is_enabled := True
ensure
module_enabled: is_enabled
end
disable
-- disable the module.
do
is_enabled := False
ensure
module_disbaled: not is_enabled
end
feature -- Hooks
help_text (a_path: STRING): STRING
do
debug ("refactor_fixme")
to_implement ("Add the corresponing implementation.")
end
create Result.make_empty
end
end