# Conflicts:
#	server/controllers/system/get-settings.php
This commit is contained in:
ivan 2017-01-11 03:50:47 -03:00
parent a7ef5c10f2
commit 9383fd0d3e
3 changed files with 4 additions and 1 deletions

View File

@ -9,6 +9,7 @@ class DisableRegistrationController extends Controller {
'requestData' => []
];
}
public function handler() {
$password = Controller::request('password');

View File

@ -3,12 +3,14 @@ use Respect\Validation\Validator as DataValidator;
class EnableRegistrationController extends Controller {
const PATH = '/enable-registration';
public function validations() {
return [
'permission' => 'staff_3',
'requestData' => []
];
}
public function handler() {
$password = Controller::request('password');
@ -23,6 +25,5 @@ class EnableRegistrationController extends Controller {
$registrationRow->store();
Response::respondSuccess();
}
}

View File

@ -50,6 +50,7 @@ class SignUpController extends Controller {
Response::respondError(ERRORS::ALREADY_BANNED);
return;
}
if (!Setting::getSetting('registration')->value) {
Response::respondError(ERRORS::NO_PERMISSION);
return;