mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-13 18:32:41 +01:00
8cc64a9678
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
20 lines
416 B
PHP
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.');
|
|
}
|
|
|
|
}
|