Added permissions "$action any node" , "$action own node" for now.
This commit is contained in:
@@ -299,6 +299,16 @@ feature -- Permission Scope: Node
|
|||||||
Result := cms_api.user_has_permission (a_user, a_action + " own " + l_type_name)
|
Result := cms_api.user_has_permission (a_user, a_action + " own " + l_type_name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
fixme ("when admin back end is ready, remove this, as too general.") -- FIXME
|
||||||
|
if not Result then
|
||||||
|
Result := cms_api.user_has_permission (a_user, a_action + " any node")
|
||||||
|
if not Result and a_user /= Void then
|
||||||
|
if is_author_of_node (a_user, a_node) then
|
||||||
|
Result := cms_api.user_has_permission (a_user, a_action + " own node")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Change: Node
|
feature -- Change: Node
|
||||||
|
|||||||
Reference in New Issue
Block a user