Added blog module as example, this is far from being a real blog module.

but this is an example about on to add a new content type, and support it.
Fixed new node form workflow.

The current state is not final, it requires many changes, but for now, it implements a node editing workflow.
This commit is contained in:
2015-04-15 22:32:38 +02:00
parent f2bb061488
commit a56338ad17
21 changed files with 1040 additions and 226 deletions

View File

@@ -46,13 +46,22 @@ feature -- Status report
elseif a_user = Void then
Result := user_role_has_permission (anonymous_user_role, a_permission)
else
Result := user_role_has_permission (authenticated_user_role, a_permission)
if not Result then
Result := across user_roles (a_user) as ic some user_role_has_permission (ic.item, a_permission) end
if is_admin_user (a_user) then
Result := True
else
Result := user_role_has_permission (authenticated_user_role, a_permission)
if not Result then
Result := across user_roles (a_user) as ic some user_role_has_permission (ic.item, a_permission) end
end
end
end
end
is_admin_user (u: CMS_USER): BOOLEAN
do
Result := u.id = 1
end
user_roles (a_user: CMS_USER): LIST [CMS_USER_ROLE]
local
l_roles: detachable LIST [CMS_USER_ROLE]