1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 05:12:41 +01:00

Check that the viewer can actually create badges before letting them create badges

Summary: Fixes T9467.

Test Plan: Set policy to "no one", got blocked.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9467

Differential Revision: https://secure.phabricator.com/D14159
This commit is contained in:
epriestley 2015-09-24 15:34:09 -07:00
parent 64ed971039
commit 381fa611fd

View file

@ -22,6 +22,9 @@ final class PhabricatorBadgesEditController
}
$is_new = false;
} else {
$this->requireApplicationCapability(
PhabricatorBadgesCreateCapability::CAPABILITY);
$badge = PhabricatorBadgesBadge::initializeNewBadge($viewer);
$is_new = true;
}