feat: persist resized column widths (#1017)
* feat: persist resized column widths Closes #981 * test: mock company and person view fields
This commit is contained in:
@ -28,6 +28,29 @@ export class ReadViewFieldAbilityHandler implements IAbilityHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class CreateViewFieldAbilityHandler implements IAbilityHandler {
|
||||
constructor(private readonly prismaService: PrismaService) {}
|
||||
|
||||
async handle(ability: AppAbility, context: ExecutionContext) {
|
||||
const gqlContext = GqlExecutionContext.create(context);
|
||||
const args = gqlContext.getArgs();
|
||||
|
||||
const allowed = await relationAbilityChecker(
|
||||
'ViewField',
|
||||
ability,
|
||||
this.prismaService.client,
|
||||
args,
|
||||
);
|
||||
|
||||
if (!allowed) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return ability.can(AbilityAction.Create, 'ViewField');
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class UpdateViewFieldAbilityHandler implements IAbilityHandler {
|
||||
constructor(private readonly prismaService: PrismaService) {}
|
||||
|
||||
Reference in New Issue
Block a user