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:
@ -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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user