Page MenuHomePhabricator

Check CAN_VIEW and CAN_EDIT at SearchAttachController
ClosedPublic

Authored by chad on Jun 22 2016, 2:46 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 14 2024, 7:37 PM
Unknown Object (File)
Feb 10 2024, 1:28 PM
Unknown Object (File)
Feb 5 2024, 11:06 PM
Unknown Object (File)
Feb 4 2024, 9:11 AM
Unknown Object (File)
Feb 3 2024, 11:01 AM
Unknown Object (File)
Jan 23 2024, 7:03 PM
Unknown Object (File)
Jan 16 2024, 8:25 PM
Unknown Object (File)
Jan 8 2024, 9:35 AM
Subscribers
Tokens
"Piece of Eight" token, awarded by epriestley.

Details

Summary

Fixes T11193. Assume this is the correct place to check for permissions before attaching edges.

Test Plan

Create a task and set edit policy to Admins, log into test account. Try to Edit Subtasks, Merge Duplicates, Attach a Diff, or Attach a Mock, get a Policy Dialog explaing why.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

chad retitled this revision from to Check CAN_VIEW and CAN_EDIT at SearchAttachController.
chad updated this object.
chad edited the test plan for this revision. (Show Details)
chad added a reviewer: epriestley.
  • Also test the Admin side
epriestley edited edge metadata.

I think this is the right rule. It does create this sort of weird outcome when you can only edit one of the objects at the ends of a relationship. For example, if you can edit task X but not revision Y, you can edit the relationship between them from the task page but not the revision page.

I think this is actually reasonable/consistent/desirable and aligns with expectations, though, at least for "X is related to Y".

For "merge", we probably want to require that you be able to edit both tasks, but all of this is likely getting modularized/refreshed shortly anyway.

This revision is now accepted and ready to land.Jun 22 2016, 12:20 PM
This revision was automatically updated to reflect the committed changes.