This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-5eb199eb-0b2a-424e-a2c8-134acb953a6f XWIKI-25466 Open

Editing the wiki dashboard displays a required rights warning to users without script right

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-01feeb79-245a-43e4-b1aa-0023c23f2338 Michael Hamann created this issue on 22/Oct/26 11:30
 
Summary: Editing the wiki dashboard displays a required rights warning to users without script right
Issue Type: cid:jira-generated-image-avatar-5eb199eb-0b2a-424e-a2c8-134acb953a6f Improvement
Affects Versions: 15.10.16, 16.10.2, 16.4.7
Assignee: Unassigned
Components: Dashboard
Created: 22/Oct/26 11:30
Priority: cid:jira-generated-image-static-major-0de1b3ac-2605-49a6-b08e-6bf5025b050f Major
Reporter: Michael Hamann
Description:

Problem

Editing the wiki dashboard (Dashboard.WebHome) shows the required rights warning ("Editing this page may result in the execution of currently disabled scripts that could be malicious.") with a "Force editing" button to every user who doesn't have script right. These users have to confirm a warning about a script they don't modify each time they edit the dashboard.

The warning comes from the {{velocity}} macro in the content of the page, which decides whether to display the personal dashboard of the current user or the wiki dashboard. Editing the dashboard only modifies the XWiki.GadgetClass objects of the page, not its content: the content author doesn't change and the script keeps working. But the edit confirmation can't know what the edit sheet allows to modify, so it always warns about the content.

Proposed solution

Move the script code out of the content of Dashboard.WebHome into a separate technical page, and either bind that page as the sheet of Dashboard.WebHome (it already has an empty XWiki.DocumentSheetBinding object) or call it with the {{display}} macro from the content. The content of Dashboard.WebHome then doesn't require script right anymore and editing the dashboard doesn't display the warning.

Once this is done, remove the "Force editing" step from DashboardIT#editDashboard, which was added for XWIKI-24822 when the docker tests started to see this warning.