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:
@@ -49,7 +49,8 @@ feature -- Status report
|
||||
if is_admin_user (a_user) then
|
||||
Result := True
|
||||
else
|
||||
Result := user_role_has_permission (authenticated_user_role, a_permission)
|
||||
fixme ("Check how to handle this predefined role")
|
||||
-- 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
|
||||
|
||||
Reference in New Issue
Block a user