mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +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:
parent
64ed971039
commit
381fa611fd
1 changed files with 3 additions and 0 deletions
|
@ -22,6 +22,9 @@ final class PhabricatorBadgesEditController
|
|||
}
|
||||
$is_new = false;
|
||||
} else {
|
||||
$this->requireApplicationCapability(
|
||||
PhabricatorBadgesCreateCapability::CAPABILITY);
|
||||
|
||||
$badge = PhabricatorBadgesBadge::initializeNewBadge($viewer);
|
||||
$is_new = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue