Unset companies and owners (#1185)

* unselect users and companies

* Icon now works with theme

---------

Co-authored-by: vboxuser <vboxuser@Ubu.myguest.virtualbox.org>
Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
This commit is contained in:
josoriomarin
2023-08-25 15:28:17 -04:00
committed by GitHub
parent 0e5dcd7037
commit 36cbafe4cc
6 changed files with 42 additions and 6 deletions

View File

@ -74,6 +74,10 @@ const simpleAbilityCheck: OperationAbilityChecker = async (
// Extract entity name from model name
const entity = camelCase(modelName);
//TODO: Fix boolean data types so that disconnects are possible
if (typeof data === 'boolean') {
return true;
}
// Handle all operations cases
const operations = !Array.isArray(data) ? [data] : data;
// Handle where case
@ -139,7 +143,6 @@ export async function relationAbilityChecker(
// Extract operation name and value
const operationType = Object.keys(operation)[0] as OperationType;
const operationValue = operation[operationType];
// Get operation checker for the operation type
const operationChecker = operationAbilityCheckers[operationType];