mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 00:32:42 +01:00
Don't show the "Override Lock" prompt when creating objects
Summary: Fixes T12369. When you create objects they may technically be locked: either because the default state is legitimately locked, or because the default policies prevent you from viewing so we sort of technically end in a locked state. Regardless, don't prompt during creation, since this prompt isn't useful even if the lock detection is completely legitimate. Test Plan: - In {nav Applications > Maniphest > Configure}, set "Default View Policy" to "No One". - Tried to create a task. - Before patch: prompted to override lock. - After patch: no override prompt. Reviewers: chad Reviewed By: chad Subscribers: d.maznekov Maniphest Tasks: T12369 Differential Revision: https://secure.phabricator.com/D17541
This commit is contained in:
parent
aa91dc992e
commit
1953ab98be
1 changed files with 4 additions and 0 deletions
|
@ -996,8 +996,12 @@ abstract class PhabricatorEditEngine
|
|||
$config = $this->getEditEngineConfiguration()
|
||||
->attachEngine($this);
|
||||
|
||||
// NOTE: Don't prompt users to override locks when creating objects,
|
||||
// even if the default settings would create a locked object.
|
||||
|
||||
$can_interact = PhabricatorPolicyFilter::canInteract($viewer, $object);
|
||||
if (!$can_interact &&
|
||||
!$this->getIsCreate() &&
|
||||
!$request->getBool('editEngine') &&
|
||||
!$request->getBool('overrideLock')) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue