Updated table nodes to support soft deletes using the new field

'deleted_at' as Datetime and give us free metadata.
Updated Sqlite builder to test different scenarios for users and roles.
Updated NODE_FORM_RESPONSE.edit_form feature to add a delete operation iff
there is a node ie node id >0 and the current user has delete permission on it.
Updated NODE_HANDLER.do_post to handle the operation "DELETE".
Updated queries to retrieve nodes filter by no logical deleted rows (ie. deleted_at is NULL).
Updated CMS_USER_API.has_permissions. (authenticated_user_role seems to generic).
This commit is contained in:
jvelilla
2015-05-08 18:40:46 -03:00
parent fdff2bef36
commit c2d0fbf445
6 changed files with 60 additions and 14 deletions

View File

@@ -228,6 +228,12 @@ feature -- Form
ts.set_default_value ("Preview")
f.extend (ts)
if a_node /= Void and then a_node.id > 0 and then has_permission ("delete " + a_name) then
create ts.make ("op")
ts.set_default_value ("Delete")
f.extend (ts)
end
Result := f
end