fix: handle access result gracefully
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Forbidden } from '../errors';
|
||||
import { Access } from '../config/types';
|
||||
import { Access, AccessResult } from '../config/types';
|
||||
|
||||
const executeAccess = async (operation, access: Access): Promise<boolean> => {
|
||||
const executeAccess = async (operation, access: Access): Promise<AccessResult> => {
|
||||
if (access) {
|
||||
const result = await access(operation);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user