mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-08 12:58:31 +01:00
345966cb41
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
16 lines
344 B
PHP
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.');
|
|
}
|
|
|
|
}
|