Repository navigation
Bug #82563 (S4b), the dashboard schedule create and update take Save to Disk, Notification and Alert - #9201
Open
Nelson-cao wants to merge 2 commits into
Open
Bug #82563 (S4b), the dashboard schedule create and update take Save to Disk, Notification and Alert#9201Nelson-cao wants to merge 2 commits into
Nelson-cao wants to merge 2 commits into
Conversation
… the Save to Disk, Notification of Task Status and Alert of an action A dashboard action of a schedule task can now save the dashboard to files, notify people that the task ran, and run only under chosen highlights, as the Schedule page's Action tab does. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…sent back with its login, a user without the option sees and learns nothing of the section A read of a task whose Save to Disk file is outside every server location carries the file's login (the user, the placeholder for the stored password, or the secret id), but sending it back was refused once the server had locations. The stored file is now matched first and its own login is accepted; a changed user, password or secret id is still refused. A user without the Save to Disk or the Notification of Task Status option no longer sees the stored section in a read (the Schedule page hides it), and is told they lack the option before any location label, format or table of the request is checked. Two server locations with the same label are refused instead of the first one being used, a path inside a location is checked against '..' however the file system spells it, a leading slash or drive, ':' and control characters, and a file with a login but no location is told a location is required. A placeholder password is refused with its own reason when it would be carried to another server or user. Adds a test that runs the comparison against the real ScheduleTaskService.sanitizeAction. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Creating or updating a dashboard schedule task through the wiz routes could set only the email of a dashboard action. The Save to Disk, Notification of Task Status and Alert parts of the Schedule page's Action tab had no way in: a task that saves its dashboard to a file, tells people that it ran, or runs only under chosen highlights could not be made or changed, and what the page stored for those parts was not in the read of a task, so it could not be sent back.
Fix
Each entry of
actionstakes three more sections. They are built into the editor model that the Schedule tab's own save stores (the same path asemail), so the save does the permission work on the real user and nothing is stored by a second path.saveToDisk:files, one per format (Excel, PowerPoint, PDF, HTML, PNG, CSV from the formats the server offers). A server with server locations needs the location's label and the path inside it, and the location's own login is used, as the page requires; a server without locations takes the whole path, and anftp://orsftp://path logs in withusernameandpassword(or asecretIdwhere the server stores secrets). The page's own path checks apply. A path inside a location is relative to its folder and may not leave it:..however the file system spells it, a leading slash or drive,:and control characters are refused; two locations with the same label are refused rather than guessed; a format is saved to one file. A file stored outside every server location (a task made before the server had locations) is read with its own login and goes back unchanged; a changed user, password or secret id is refused. The layout of the saved files and the CSV settings are set with it; a CSV file needs the tables it exports, checked against the dashboard's tables.files: []turns Save to Disk off; an entry with only layout fields keeps the stored files.notification:to,onlyIfFailed,includeLink;to: []turns it off.alert:highlightsas{assembly, highlight}, each checked against the highlights the dashboard has;[]runs the action always.actions[i].saveToDiskoractions[i].notificationfor anything the action does not already have, before any location label, format or table of the request is checked. A read leaves those two sections out for such a user, as the page hides them, and an update that leaves a section out keeps the stored one. After the save, what it kept is compared with what was asked (files, logins, layout, CSV settings, notification, alert), so a change the save would drop or restore is refused naming the field instead of being stored as something else. A password is never read back; the read gives a placeholder that keeps the stored password only for the same login, and a placeholder that would be carried to another server or user is refused with that reason.actions-delivery.ScheduleTaskService.getServerLocations(Principal)is a public wrapper of the lookupgetServerLocationLabelsalready uses, so the locations can be resolved by label.Tests
WizScheduleDeliveryTest(46) covers every section, refusal and round trip behind the stand-in for the Schedule tab's save that the other wiz schedule tests use.WizScheduleDeliveryStoredTest(8) goes through the portal's ownScheduleService.getActionFromModelandgetActionModelwith a real server location: the location's stored password, the password kept only for the same login, a stored FTP file outside every location sent back with its password kept, several formats with the CSV tables and layout, the notification and the alert, the stored XML, and the read sent back as a write.WizScheduleDeliverySanitizerTest(4) runs the comparison against the realScheduleTaskService.sanitizeActionfor a user without the Save to Disk and the Notification of Task Status options. The shared test fixture ofWizScheduleConditionsTestis extended for the new sections.🤖 Generated with Claude Code