1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-08 12:58:31 +01:00
phorge-phorge/src/applications/people/capability/PeopleCreateUsersCapability.php
Bob Trahan 345966cb41 People - refine permissions on creating new users
Summary: Fixes T7142. Make old permission mean "make (non-bot) users" and then nuance the UI for those administrators who can make bot accounts.

Test Plan: loaded up admin a with full powers and admin b with restricted powers. noted admin a could make a full user. noted admin b could not make a full user. noted admin b got an error even via clever uri hacking.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7142

Differential Revision: https://secure.phabricator.com/D11702
2015-02-05 16:47:09 -08:00

16 lines
344 B
PHP

<?php
final class PeopleCreateUsersCapability
extends PhabricatorPolicyCapability {
const CAPABILITY = 'people.create.users';
public function getCapabilityName() {
return pht('Can Create (non-bot) Users');
}
public function describeCapabilityRejection() {
return pht('You do not have permission to create users.');
}
}