The "Can Bulk Edit Tasks" Maniphest application setting introduced in rP7fedfacbca27c165cf193f286cef9306cf9762e2 applies to the "Bulk Edit Tasks…" menu item in the project workboard column dropdown. Make it also apply to the menu items "Move Tasks to Column…" and "Move Tasks to Project…" as those are similar actions.
Details
- Reviewers
valerio.bozzolan - Group Reviewers
O1: Blessed Committers
- Go to /applications/view/PhabricatorManiphestApplication/ and set Can Bulk Edit Tasks to Administrators
- Go to /project/board/1/ and create a second column
- As a default user, open the column header dropdown of the default column on /project/board/1/
- Select Bulk Edit Tasks… (no changes in behavior)
- Select Move Tasks to Column…; select Move Tasks to Project…, don't succeed.
- Try step 5 again as an administrator, succeed.
Diff Detail
- Repository
- rP Phorge
- Branch
- bulkPerms (branched from master)
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 1787 Build 1787: arc lint + arc unit
Event Timeline
(Feel free to copy-paste the downstream task in Phorge - so the lack of task is not used as blocking reason - maybe title "Allow to mitigate spammers from workboard bulk move" or something similar)
P.S. maybe if the task number is very small (e.g. 2) maybe we can still allow that.
src/applications/project/controller/PhabricatorProjectColumnBulkMoveController.php | ||
---|---|---|
45 | Does it work with the ::class notation? so the IDE is happier It should be 100% the same since it returns the very same string. We already have done that somewhere. |
src/applications/project/controller/PhabricatorProjectColumnBulkMoveController.php | ||
---|---|---|
45 | grep -r "PhabricatorApplication::getByClass" . | wc -l says 46. If you prefer to replace that by a different notation to make some IDE happy, feel free to file a separate task for consistency across the codebase. Thanks! |
I'd prefer not to introduce non-obvious confusing behavior (sometimes it does, sometimes it doesn't?) to increase code (and testing) complexity for no good reason...
You are right premising that I thought that is there is just 1 task this "bulk blocker" has just no sense since the user can just drag & drop that task lol, so it sounded a bit overkill to add such "You do not have permission to bulk edit 1 task" lol
src/applications/project/controller/PhabricatorProjectColumnBulkMoveController.php | ||
---|---|---|
59 | ↑ What's this? Maybe we should just add here the ManiphestBulkEditCapability::CAPABILITY ? |