Added finer control on path_alias.
- added a permission to edit path alias. - added an admin handler to manage path aliases. When path alias is changed on node, always keep previous path alias. (can be unset from the related admin section). CMS_API.storage.path_aliases returns the list of path aliases (recents aliases come first).
This commit is contained in:
@@ -10,7 +10,8 @@ inherit
|
||||
CMS_MODULE
|
||||
redefine
|
||||
initialize,
|
||||
install
|
||||
install,
|
||||
permissions
|
||||
end
|
||||
|
||||
create
|
||||
@@ -102,6 +103,20 @@ feature -- Router
|
||||
do
|
||||
end
|
||||
|
||||
feature -- Security
|
||||
|
||||
permissions: LIST [READABLE_STRING_8]
|
||||
-- List of permission ids, used by this module, and declared.
|
||||
do
|
||||
Result := Precursor
|
||||
Result.force ("install modules")
|
||||
Result.force ("view logs")
|
||||
Result.force ("export core")
|
||||
Result.force ("import core")
|
||||
Result.force ("admin path_alias")
|
||||
Result.force ("edit path_alias")
|
||||
end
|
||||
|
||||
note
|
||||
copyright: "2011-2017, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
|
||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||
|
||||
@@ -153,7 +153,7 @@ feature -- URL aliases
|
||||
sql_finalize
|
||||
end
|
||||
|
||||
sql_select_all_path_alias: STRING = "SELECT source, alias, lang FROM path_aliases;"
|
||||
sql_select_all_path_alias: STRING = "SELECT source, alias, lang FROM path_aliases ORDER BY pid DESC;"
|
||||
-- SQL select all path aliases.
|
||||
|
||||
sql_select_path_alias: STRING = "SELECT source FROM path_aliases WHERE alias=:alias ;"
|
||||
@@ -411,6 +411,6 @@ feature -- Misc
|
||||
|
||||
|
||||
note
|
||||
copyright: "2011-2016, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
|
||||
copyright: "2011-2017, Jocelyn Fiat, Javier Velilla, 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