1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-13 18:32:41 +01:00
phorge-phorge/src/applications/project/capability/ProjectCapabilityCreateProjects.php
Asher Baker 8cc64a9678 Add a 'create' policy to Project
Summary: UX on this could probably be better 'disabled' crumbs don't appear to have any visible difference, and the policy error has to load the /create page rather than being a modal - not sure on the way to fix these.

Test Plan: Tried to create a project with and without access, saw suitable error.

Reviewers: epriestley, #blessed_reviewers

CC: Korvin, epriestley, aran

Differential Revision: https://secure.phabricator.com/D7279
2013-10-10 04:33:18 -07:00

20 lines
416 B
PHP

<?php
final class ProjectCapabilityCreateProjects
extends PhabricatorPolicyCapability {
const CAPABILITY = 'project.create';
public function getCapabilityKey() {
return self::CAPABILITY;
}
public function getCapabilityName() {
return pht('Can Create Projects');
}
public function describeCapabilityRejection() {
return pht('You do not have permission to create new projects.');
}
}