29 lines
737 B
PHP
29 lines
737 B
PHP
<?php
|
|
|
|
use api\classes\API_portalsettings;
|
|
|
|
session_start();
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/api/classes/API_portalsettings.php';
|
|
|
|
$API_portalsettings = new API_portalsettings();
|
|
|
|
if ($API_portalsettings->request_method === 'PUT') {
|
|
|
|
# Edit the portal settings of the platform
|
|
|
|
$API_portalsettings->checkPermissions('admin-portalsettings', 'RW');
|
|
|
|
$requiredFields = [
|
|
'portal_uuid' => ['type' => 'uuid'],
|
|
'portal_name' => ['type' => 'string'],
|
|
'portal_provider_name' => ['type' => 'string'],
|
|
'admin_auth_methods' => ['type' => 'string']
|
|
];
|
|
|
|
$API_portalsettings->validateData($requiredFields);
|
|
|
|
# Update the permission
|
|
$API_portalsettings->updatePortalSettings();
|
|
|
|
}
|