mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-08 22:01:03 +01:00
Don't require "CAN_EDIT" to watch/unwatch a project
Summary: See T1024. When "CAN_EDIT" became default in T13186, this was missed as an exception. Watching shouldn't require "CAN_EDIT", so exempt it. Test Plan: - Before change: tried to watch a project I could not edit, got a policy error. - After change: watched/unwatched a project I could not edit. Reviewers: amckinley Reviewed By: amckinley Differential Revision: https://secure.phabricator.com/D19977
This commit is contained in:
parent
64e3296fe6
commit
966a93334c
1 changed files with 3 additions and 0 deletions
|
@ -1677,6 +1677,9 @@ abstract class PhabricatorApplicationTransactionEditor
|
||||||
|
|
||||||
// You need CAN_EDIT to change members other than yourself.
|
// You need CAN_EDIT to change members other than yourself.
|
||||||
return PhabricatorPolicyCapability::CAN_EDIT;
|
return PhabricatorPolicyCapability::CAN_EDIT;
|
||||||
|
case PhabricatorObjectHasWatcherEdgeType::EDGECONST:
|
||||||
|
// See PHI1024. Watching a project does not require CAN_EDIT.
|
||||||
|
return null;
|
||||||
default:
|
default:
|
||||||
return PhabricatorPolicyCapability::CAN_EDIT;
|
return PhabricatorPolicyCapability::CAN_EDIT;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue