Added webapi system and first attempt for the core webapi.
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.
This commit is contained in:
@@ -98,19 +98,6 @@ feature -- Roles
|
||||
roles: detachable LIST [CMS_USER_ROLE]
|
||||
-- If set, list of roles for current user.
|
||||
|
||||
feature -- Access: data
|
||||
|
||||
item (k: READABLE_STRING_GENERAL): detachable ANY assign put
|
||||
-- Additional item data associated with key `k'.
|
||||
do
|
||||
if attached items as tb then
|
||||
Result := tb.item (k)
|
||||
end
|
||||
end
|
||||
|
||||
items: detachable STRING_TABLE [detachable ANY]
|
||||
-- Additional data.
|
||||
|
||||
feature -- Status report
|
||||
|
||||
has_id: BOOLEAN
|
||||
@@ -223,29 +210,6 @@ feature -- Element change: roles
|
||||
roles := lst
|
||||
end
|
||||
|
||||
feature -- Change element: data
|
||||
|
||||
put (d: like item; k: READABLE_STRING_GENERAL)
|
||||
-- Associate data item `d' with key `k'.
|
||||
local
|
||||
tb: like items
|
||||
do
|
||||
tb := items
|
||||
if tb = Void then
|
||||
create tb.make (1)
|
||||
items := tb
|
||||
end
|
||||
tb.force (d, k)
|
||||
end
|
||||
|
||||
remove (k: READABLE_STRING_GENERAL)
|
||||
-- Remove data item associated with key `k'.
|
||||
do
|
||||
if attached items as tb then
|
||||
tb.remove (k)
|
||||
end
|
||||
end
|
||||
|
||||
feature -- Status change
|
||||
|
||||
mark_not_active
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
note
|
||||
description: "[
|
||||
User profile used to extend information associated with a {CMS_USER}.
|
||||
]"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
CMS_USER_PROFILE
|
||||
|
||||
inherit
|
||||
TABLE_ITERABLE [READABLE_STRING_32, READABLE_STRING_GENERAL]
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make
|
||||
-- Create Current profile.
|
||||
do
|
||||
create items.make (0)
|
||||
end
|
||||
|
||||
feature -- Access
|
||||
|
||||
item alias "[]" (k: READABLE_STRING_GENERAL): detachable READABLE_STRING_32
|
||||
-- Profile item associated with key `k`.
|
||||
do
|
||||
Result := items.item (k)
|
||||
end
|
||||
|
||||
has_key (k: READABLE_STRING_GENERAL): BOOLEAN
|
||||
-- Has a profile item associated with key `k`?
|
||||
do
|
||||
Result := items.has (k)
|
||||
end
|
||||
|
||||
count: INTEGER
|
||||
do
|
||||
Result := items.count
|
||||
end
|
||||
|
||||
is_empty: BOOLEAN
|
||||
do
|
||||
Result := items.is_empty
|
||||
end
|
||||
|
||||
feature -- Change
|
||||
|
||||
force (v: READABLE_STRING_GENERAL; k: READABLE_STRING_GENERAL)
|
||||
-- Associated value `v` with key `k`.
|
||||
do
|
||||
items.force (v.to_string_32, k)
|
||||
end
|
||||
|
||||
feature -- Access
|
||||
|
||||
new_cursor: TABLE_ITERATION_CURSOR [READABLE_STRING_32, READABLE_STRING_GENERAL]
|
||||
-- Fresh cursor associated with current structure
|
||||
do
|
||||
Result := items.new_cursor
|
||||
end
|
||||
|
||||
feature {NONE} -- Implementation
|
||||
|
||||
items: STRING_TABLE [READABLE_STRING_32]
|
||||
|
||||
;note
|
||||
copyright: "2011-2014, Javier Velilla, Jocelyn Fiat, 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