1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-11 08:06:13 +01:00
phorge-phorge/src/applications/subscriptions
epriestley e44b40ca4d Make "Subscribe/Unsubscribe" require only "CAN_VIEW", not "CAN_INTERACT"
Summary:
Ref T13249. See PHI1059. Currently, Subscribe/Unsubscribe require CAN_INTERACT via the web UI and no permissions (i.e., effectively CAN_VIEW) via the API.

Weaken the requirements from the web UI so that you do not need "CAN_INTERACT". This is a product change to the effect that it's okay to subscribe/unsubscribe from anything you can see, even hard-locked tasks. This generally seems reasonable.

Increase the requirements for the actual transaction, which mostly applies to API changes:

  - To remove subscribers other than yourself, require CAN_EDIT.
  - To add subscribers other than yourself, require CAN_EDIT or CAN_INTERACT. You may have CAN_EDIT but not CAN_INTERACT on "soft locked" tasks. It's okay to click "Edit" on these, click "Yes, override lock", then remove subscribers other than yourself.

This technically plugs some weird, mostly theoretical holes in the API where "attackers" could sometimes make more subscription changes than they should have been able to. Now that we send you email when you're unsubscribed this could only really be used to be mildly mischievous, but no harm in making the policy enforcement more correct.

Test Plan: Against normal, soft-locked, and hard-locked tasks: subscribed, unsubscribed, added and removed subscribers, overrode locks, edited via API. Everything worked like it should and I couldn't find any combination of lock state, policy state, and edit pathway that did anything suspicious.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13249

Differential Revision: https://secure.phabricator.com/D20174
2019-02-19 10:52:34 -08:00
..
application Add "Mute/Unmute" for subscribable objects 2018-02-08 11:06:22 -08:00
command phtize all the things 2015-05-22 21:16:39 +10:00
controller Make "Subscribe/Unsubscribe" require only "CAN_VIEW", not "CAN_INTERACT" 2019-02-19 10:52:34 -08:00
editor Modularize SearchEngine extensions 2015-12-14 04:23:02 -08:00
engineextension Add more mail stamps: tasks, subscribers, projects, spaces 2018-02-06 04:05:46 -08:00
events Make "Subscribe/Unsubscribe" require only "CAN_VIEW", not "CAN_INTERACT" 2019-02-19 10:52:34 -08:00
herald Various translation improvements 2015-11-03 07:02:46 +11:00
interface Remove shouldShowSubscribersProperty() from SubscribableInterface 2016-03-06 06:01:36 -08:00
policyrule When loading project membership to evaluate the "Subscribers" policy, use the ominipotent viewer 2018-03-14 12:59:31 -07:00
query Modernize remaining edge types 2015-01-03 10:58:20 +11:00
view Remove some array typehints for passing around 2018-08-13 16:07:56 -07:00