Hello,
I've tried making a custom Ægir module to do a couple of maintenance tasks on my sites. Problem is my tasks defined in hook_hosting_tasks() do not show up on the site/platform nodes.
I've identified the problem to hosting_task_fetch_tasks(). Problem is the function does not respect a task's custom access callbacks when deciding what tasks are valid. It always uses hosting_task_menu_access() which is very restrictive and sorts away anything not defined by Ægir.
The supplied patch solves this by inspecting the task to see if a custom access callback is provided, if that's the case that one is used, otherwise we fall back to hosting_task_menu_access().
I'd like someone, with a bit more insight into the machinery, could review the patch and verify that this doesn't break anything. This is how I specify my custom task. With the patch applied it shows up when viewing a platform node, https://github.com/simme/aegir-sites_switch_domain/blob/master/sites_swi.... However I don't have the means to do extensive testing on this one! :)
Cheers
| Comment | File | Size | Author |
|---|---|---|---|
| hosting_task.patch | 891 bytes | SimmeLj |
Comments
Comment #1
anarcat commentedseems like a valid API concern, marking for 1.0.
Comment #2
anarcat commentedCommitted, thanks.