Added error handler argument in CMS_STORAGE_BUILDER.storage (...) function.
Removed testing purpose code. Update debug module.
This commit is contained in:
@@ -11,9 +11,12 @@ deferred class
|
||||
|
||||
feature -- Factory
|
||||
|
||||
storage (a_setup: CMS_SETUP): detachable CMS_STORAGE
|
||||
storage (a_setup: CMS_SETUP; a_error_handler: ERROR_HANDLER): detachable CMS_STORAGE
|
||||
-- CMS Storage object based on CMS setup `a_setup'.
|
||||
deferred
|
||||
end
|
||||
|
||||
note
|
||||
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
|
||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||
end
|
||||
|
||||
@@ -14,9 +14,12 @@ inherit
|
||||
|
||||
feature -- Factory
|
||||
|
||||
storage (a_setup: CMS_SETUP): detachable CMS_STORAGE_NULL
|
||||
storage (a_setup: CMS_SETUP; a_error_handler: ERROR_HANDLER): detachable CMS_STORAGE_NULL
|
||||
do
|
||||
create Result
|
||||
end
|
||||
|
||||
note
|
||||
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
|
||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||
end
|
||||
|
||||
@@ -59,37 +59,9 @@ feature -- Initialization
|
||||
l_authenticated_role.add_permission ("trash own page")
|
||||
a_storage.save_user_role (l_authenticated_role)
|
||||
|
||||
|
||||
--|-------------------------------------------|--
|
||||
--| For testing purpose, to be removed later. |--
|
||||
--|-------------------------------------------|--
|
||||
|
||||
-- Roles, view role for testing.
|
||||
create r.make ("view")
|
||||
r.add_permission ("view any page")
|
||||
a_storage.save_user_role (r)
|
||||
|
||||
create {ARRAYED_LIST [CMS_USER_ROLE]} l_roles.make (1)
|
||||
l_roles.force (r)
|
||||
|
||||
create u.make ("auth")
|
||||
u.set_password ("enticated#")
|
||||
u.set_email (a_setup.site_email)
|
||||
u.set_status ({CMS_USER}.active)
|
||||
a_storage.new_user (u)
|
||||
|
||||
create u.make ("test")
|
||||
u.set_password ("test#")
|
||||
u.set_email (a_setup.site_email)
|
||||
u.set_status ({CMS_USER}.active)
|
||||
a_storage.new_user (u)
|
||||
|
||||
create u.make ("view")
|
||||
u.set_password ("only#")
|
||||
u.set_email (a_setup.site_email)
|
||||
u.set_status ({CMS_USER}.active)
|
||||
u.set_roles (l_roles)
|
||||
a_storage.new_user (u)
|
||||
end
|
||||
|
||||
note
|
||||
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
|
||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user