Merge branch 'main' into develop
commit
19c1106248
|
@ -26,8 +26,9 @@ class EncryptionKeysController extends AppController
|
||||||
],
|
],
|
||||||
'contain' => ['Individuals', 'Organisations']
|
'contain' => ['Individuals', 'Organisations']
|
||||||
]);
|
]);
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
|
return $responsePayload;
|
||||||
}
|
}
|
||||||
$this->set('metaGroup', 'ContactDB');
|
$this->set('metaGroup', 'ContactDB');
|
||||||
}
|
}
|
||||||
|
@ -35,8 +36,9 @@ class EncryptionKeysController extends AppController
|
||||||
public function delete($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
$this->CRUD->delete($id);
|
$this->CRUD->delete($id);
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
|
return $responsePayload;
|
||||||
}
|
}
|
||||||
$this->set('metaGroup', 'ContactDB');
|
$this->set('metaGroup', 'ContactDB');
|
||||||
}
|
}
|
||||||
|
@ -44,8 +46,9 @@ class EncryptionKeysController extends AppController
|
||||||
public function add()
|
public function add()
|
||||||
{
|
{
|
||||||
$this->CRUD->add(['redirect' => $this->referer()]);
|
$this->CRUD->add(['redirect' => $this->referer()]);
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
|
return $responsePayload;
|
||||||
}
|
}
|
||||||
$this->loadModel('Organisations');
|
$this->loadModel('Organisations');
|
||||||
$this->loadModel('Individuals');
|
$this->loadModel('Individuals');
|
||||||
|
@ -70,8 +73,9 @@ class EncryptionKeysController extends AppController
|
||||||
'redirect' => $this->referer()
|
'redirect' => $this->referer()
|
||||||
];
|
];
|
||||||
$this->CRUD->edit($id, $params);
|
$this->CRUD->edit($id, $params);
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
|
return $responsePayload;
|
||||||
}
|
}
|
||||||
$this->set('dropdownData', []);
|
$this->set('dropdownData', []);
|
||||||
$this->set('metaGroup', 'ContactDB');
|
$this->set('metaGroup', 'ContactDB');
|
||||||
|
|
|
@ -36,8 +36,9 @@ class LocalToolsController extends AppController
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
|
return $responsePayload;
|
||||||
}
|
}
|
||||||
$this->set('metaGroup', 'Administration');
|
$this->set('metaGroup', 'Administration');
|
||||||
}
|
}
|
||||||
|
@ -102,8 +103,9 @@ class LocalToolsController extends AppController
|
||||||
public function add($connector = false)
|
public function add($connector = false)
|
||||||
{
|
{
|
||||||
$this->CRUD->add();
|
$this->CRUD->add();
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
|
return $responsePayload;
|
||||||
}
|
}
|
||||||
$connectors = $this->LocalTools->extractMeta($this->LocalTools->getConnectors());
|
$connectors = $this->LocalTools->extractMeta($this->LocalTools->getConnectors());
|
||||||
$dropdownData = ['connectors' => []];
|
$dropdownData = ['connectors' => []];
|
||||||
|
@ -133,8 +135,9 @@ class LocalToolsController extends AppController
|
||||||
public function edit($id)
|
public function edit($id)
|
||||||
{
|
{
|
||||||
$this->CRUD->edit($id);
|
$this->CRUD->edit($id);
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
|
return $responsePayload;
|
||||||
}
|
}
|
||||||
if ($this->ParamHandler->isAjax() && !empty($this->ajaxResponsePayload)) {
|
if ($this->ParamHandler->isAjax() && !empty($this->ajaxResponsePayload)) {
|
||||||
return $this->ajaxResponsePayload;
|
return $this->ajaxResponsePayload;
|
||||||
|
@ -152,8 +155,9 @@ class LocalToolsController extends AppController
|
||||||
public function delete($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
$this->CRUD->delete($id);
|
$this->CRUD->delete($id);
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
|
return $responsePayload;
|
||||||
}
|
}
|
||||||
$this->set('metaGroup', 'Administration');
|
$this->set('metaGroup', 'Administration');
|
||||||
}
|
}
|
||||||
|
@ -193,8 +197,9 @@ class LocalToolsController extends AppController
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
|
return $responsePayload;
|
||||||
}
|
}
|
||||||
$this->set('metaGroup', 'Administration');
|
$this->set('metaGroup', 'Administration');
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,8 +15,9 @@ class MetaTemplateFieldsController extends AppController
|
||||||
'filters' => ['field', 'type', 'meta_template_id'],
|
'filters' => ['field', 'type', 'meta_template_id'],
|
||||||
'quickFilters' => ['field', 'type']
|
'quickFilters' => ['field', 'type']
|
||||||
]);
|
]);
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
|
return $responsePayload;
|
||||||
}
|
}
|
||||||
$this->set('metaGroup', 'Administration');
|
$this->set('metaGroup', 'Administration');
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,8 +51,9 @@ class MetaTemplatesController extends AppController
|
||||||
],
|
],
|
||||||
'contain' => ['MetaTemplateFields']
|
'contain' => ['MetaTemplateFields']
|
||||||
]);
|
]);
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
|
return $responsePayload;
|
||||||
}
|
}
|
||||||
$this->set('defaultTemplatePerScope', $this->MetaTemplates->getDefaultTemplatePerScope());
|
$this->set('defaultTemplatePerScope', $this->MetaTemplates->getDefaultTemplatePerScope());
|
||||||
$this->set('alignmentScope', 'individuals');
|
$this->set('alignmentScope', 'individuals');
|
||||||
|
@ -64,8 +65,9 @@ class MetaTemplatesController extends AppController
|
||||||
$this->CRUD->view($id, [
|
$this->CRUD->view($id, [
|
||||||
'contain' => ['MetaTemplateFields']
|
'contain' => ['MetaTemplateFields']
|
||||||
]);
|
]);
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
|
return $responsePayload;
|
||||||
}
|
}
|
||||||
$this->set('metaGroup', 'Administration');
|
$this->set('metaGroup', 'Administration');
|
||||||
}
|
}
|
||||||
|
@ -79,10 +81,9 @@ class MetaTemplatesController extends AppController
|
||||||
} else {
|
} else {
|
||||||
$this->CRUD->toggle($id, $fieldName);
|
$this->CRUD->toggle($id, $fieldName);
|
||||||
}
|
}
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
} else if($this->ParamHandler->isAjax() && $this->request->is(['post', 'put'])) {
|
return $responsePayload;
|
||||||
return $this->ajaxResponsePayload;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,8 +26,9 @@ class IndividualsController extends AppController
|
||||||
'quickFilters' => ['uuid', 'email', 'first_name', 'last_name', 'position'],
|
'quickFilters' => ['uuid', 'email', 'first_name', 'last_name', 'position'],
|
||||||
'contain' => ['Alignments' => 'Organisations']
|
'contain' => ['Alignments' => 'Organisations']
|
||||||
]);
|
]);
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
|
return $responsePayload;
|
||||||
}
|
}
|
||||||
$this->set('alignmentScope', 'organisations');
|
$this->set('alignmentScope', 'organisations');
|
||||||
$this->set('metaGroup', 'Public');
|
$this->set('metaGroup', 'Public');
|
||||||
|
|
|
@ -26,8 +26,9 @@ class OrganisationsController extends AppController
|
||||||
'quickFilters' => ['name', 'uuid', 'nationality', 'sector', 'type', 'url'],
|
'quickFilters' => ['name', 'uuid', 'nationality', 'sector', 'type', 'url'],
|
||||||
'contain' => ['Alignments' => 'Individuals']
|
'contain' => ['Alignments' => 'Individuals']
|
||||||
]);
|
]);
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
|
return $responsePayload;
|
||||||
}
|
}
|
||||||
$this->set('alignmentScope', 'individuals');
|
$this->set('alignmentScope', 'individuals');
|
||||||
$this->set('metaGroup', 'Public');
|
$this->set('metaGroup', 'Public');
|
||||||
|
|
|
@ -18,8 +18,9 @@ class RolesController extends AppController
|
||||||
'filters' => ['name', 'uuid', 'perm_admin', 'Users.id'],
|
'filters' => ['name', 'uuid', 'perm_admin', 'Users.id'],
|
||||||
'quickFilters' => ['name']
|
'quickFilters' => ['name']
|
||||||
]);
|
]);
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
|
return $responsePayload;
|
||||||
}
|
}
|
||||||
$this->set('metaGroup', $this->isAdmin ? 'Administration' : 'Cerebrate');
|
$this->set('metaGroup', $this->isAdmin ? 'Administration' : 'Cerebrate');
|
||||||
}
|
}
|
||||||
|
@ -27,8 +28,9 @@ class RolesController extends AppController
|
||||||
public function add()
|
public function add()
|
||||||
{
|
{
|
||||||
$this->CRUD->add();
|
$this->CRUD->add();
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
|
return $responsePayload;
|
||||||
}
|
}
|
||||||
$this->set('metaGroup', $this->isAdmin ? 'Administration' : 'Cerebrate');
|
$this->set('metaGroup', $this->isAdmin ? 'Administration' : 'Cerebrate');
|
||||||
}
|
}
|
||||||
|
@ -36,8 +38,9 @@ class RolesController extends AppController
|
||||||
public function view($id)
|
public function view($id)
|
||||||
{
|
{
|
||||||
$this->CRUD->view($id);
|
$this->CRUD->view($id);
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
|
return $responsePayload;
|
||||||
}
|
}
|
||||||
$this->set('metaGroup', $this->isAdmin ? 'Administration' : 'Cerebrate');
|
$this->set('metaGroup', $this->isAdmin ? 'Administration' : 'Cerebrate');
|
||||||
}
|
}
|
||||||
|
@ -45,8 +48,9 @@ class RolesController extends AppController
|
||||||
public function edit($id)
|
public function edit($id)
|
||||||
{
|
{
|
||||||
$this->CRUD->edit($id);
|
$this->CRUD->edit($id);
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
|
return $responsePayload;
|
||||||
}
|
}
|
||||||
$this->set('metaGroup', $this->isAdmin ? 'Administration' : 'Cerebrate');
|
$this->set('metaGroup', $this->isAdmin ? 'Administration' : 'Cerebrate');
|
||||||
$this->render('add');
|
$this->render('add');
|
||||||
|
@ -55,8 +59,9 @@ class RolesController extends AppController
|
||||||
public function delete($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
$this->CRUD->delete($id);
|
$this->CRUD->delete($id);
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
|
return $responsePayload;
|
||||||
}
|
}
|
||||||
$this->set('metaGroup', $this->isAdmin ? 'Administration' : 'Cerebrate');
|
$this->set('metaGroup', $this->isAdmin ? 'Administration' : 'Cerebrate');
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,9 @@ class SharingGroupsController extends AppController
|
||||||
'contain' => ['SharingGroupOrgs', 'Organisations', 'Users' => ['fields' => ['id', 'username']]],
|
'contain' => ['SharingGroupOrgs', 'Organisations', 'Users' => ['fields' => ['id', 'username']]],
|
||||||
'filters' => ['uuid', 'description', 'releasability', 'Organisations.name', 'Organisations.uuid']
|
'filters' => ['uuid', 'description', 'releasability', 'Organisations.name', 'Organisations.uuid']
|
||||||
]);
|
]);
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
|
return $responsePayload;
|
||||||
}
|
}
|
||||||
$this->set('metaGroup', 'Trust Circles');
|
$this->set('metaGroup', 'Trust Circles');
|
||||||
}
|
}
|
||||||
|
@ -45,8 +46,9 @@ class SharingGroupsController extends AppController
|
||||||
$this->CRUD->view($id, [
|
$this->CRUD->view($id, [
|
||||||
'contain' => ['SharingGroupOrgs', 'Organisations', 'Users' => ['fields' => ['id', 'username']]]
|
'contain' => ['SharingGroupOrgs', 'Organisations', 'Users' => ['fields' => ['id', 'username']]]
|
||||||
]);
|
]);
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
|
return $responsePayload;
|
||||||
}
|
}
|
||||||
$this->set('metaGroup', 'Trust Circles');
|
$this->set('metaGroup', 'Trust Circles');
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,9 @@ class UsersController extends AppController
|
||||||
'filters' => ['Users.email', 'uuid'],
|
'filters' => ['Users.email', 'uuid'],
|
||||||
'quickFilters' => ['uuid', ['username' => true], ['Individuals.first_name' => true], ['Individuals.last_name' => true], 'Individuals.email'],
|
'quickFilters' => ['uuid', ['username' => true], ['Individuals.first_name' => true], ['Individuals.last_name' => true], 'Individuals.email'],
|
||||||
]);
|
]);
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
|
return $responsePayload;
|
||||||
}
|
}
|
||||||
$this->set('metaGroup', $this->isAdmin ? 'Administration' : 'Cerebrate');
|
$this->set('metaGroup', $this->isAdmin ? 'Administration' : 'Cerebrate');
|
||||||
}
|
}
|
||||||
|
@ -49,8 +50,9 @@ class UsersController extends AppController
|
||||||
$this->CRUD->view($id, [
|
$this->CRUD->view($id, [
|
||||||
'contain' => ['Individuals' => ['Alignments' => 'Organisations'], 'Roles']
|
'contain' => ['Individuals' => ['Alignments' => 'Organisations'], 'Roles']
|
||||||
]);
|
]);
|
||||||
if ($this->ParamHandler->isRest()) {
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
return $this->restResponsePayload;
|
if (!empty($responsePayload)) {
|
||||||
|
return $responsePayload;
|
||||||
}
|
}
|
||||||
$this->set('metaGroup', $this->isAdmin ? 'Administration' : 'Cerebrate');
|
$this->set('metaGroup', $this->isAdmin ? 'Administration' : 'Cerebrate');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue