Make it possible to create new tasks with Blender's policies
This commit is contained in:
@@ -453,6 +453,17 @@ final class ManiphestTransactionEditor
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($app_capability) {
|
if ($app_capability) {
|
||||||
|
// Special exception for Blender:
|
||||||
|
// We don't want users to modify someone's else task policy and we don't
|
||||||
|
// really want user himself to modifu policy. Additionally, we can't grant
|
||||||
|
// policy modification to just task author which makes it's tricky to create
|
||||||
|
// new objects.
|
||||||
|
// So we ignore edit policy for new objects.
|
||||||
|
if ($app_capability == ManiphestEditPoliciesCapability::CAPABILITY) {
|
||||||
|
if ($object->getPHID() == "") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
$app = id(new PhabricatorApplicationQuery())
|
$app = id(new PhabricatorApplicationQuery())
|
||||||
->setViewer($this->getActor())
|
->setViewer($this->getActor())
|
||||||
->withClasses(array('PhabricatorManiphestApplication'))
|
->withClasses(array('PhabricatorManiphestApplication'))
|
||||||
|
|||||||
Reference in New Issue
Block a user