Opened 6 years ago
Last modified 6 years ago
#44894 assigned enhancement
Add support for an optional `$roles` parameter to `populate_roles()`
Reported by: | flixos90 | Owned by: | flixos90 |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | |
Component: | Upgrade/Install | Keywords: | needs-patch needs-unit-tests |
Focuses: | multisite | Cc: |
Description
It should be possible to provide custom roles (and capabilities) to populate_roles()
when populating a new site with its roles. This came up during work on #41333.
Change History (4)
This ticket was mentioned in Slack in #core-multisite by jeremyfelt. View the logs.
6 years ago
#3
follow-up:
↓ 4
@
6 years ago
Not sure if this counts as part of the proposed changes, but I noticed recently that populate_roles()
can generate many dozens of consecutive database writes, which can wreak havoc in certain environments. I wonder if we might consider setting use_db = false
at the beginning of the populate
process, and then doing a single save at the end.
Note: See
TracTickets for help on using
tickets.
Since it was agreed on that implementation of this would be rather complex to get it right (particularly because extra roles are typically added by plugins, and those only work on the current site unless network-active), let's move this to a TBD milestone.
#41333 does not provide support for this for the same reason.