chore: Use types from the web package
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { IAuthenticationStep, IJSONObject } from '@automatisch/types';
|
||||
import type { IAuthenticationStep, IJSONObject } from 'types';
|
||||
import apolloClient from 'graphql/client';
|
||||
import MUTATIONS from 'graphql/mutations';
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import template from 'lodash/template';
|
||||
import type { IAuthenticationStepField, IJSONObject } from '@automatisch/types';
|
||||
import type { IAuthenticationStepField, IJSONObject } from 'types';
|
||||
|
||||
const interpolate = /{([\s\S]+?)}/g;
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { IRole, IPermission } from '@automatisch/types';
|
||||
import { IRole, IPermission } from 'types';
|
||||
|
||||
type ComputeAction = {
|
||||
conditions: Record<string, boolean>;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import template from 'lodash/template';
|
||||
import type { IAuthenticationStepField, IJSONObject } from '@automatisch/types';
|
||||
import type { IAuthenticationStepField, IJSONObject } from 'types';
|
||||
|
||||
const interpolate = /{([\s\S]+?)}/g;
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { IJSONObject } from '@automatisch/types';
|
||||
import { IJSONObject } from 'types';
|
||||
import set from 'lodash/set';
|
||||
|
||||
export default function nestObject<T = IJSONObject>(
|
||||
|
@@ -1,5 +1,9 @@
|
||||
import { PureAbility, fieldPatternMatcher, mongoQueryMatcher } from '@casl/ability';
|
||||
import { IUser } from '@automatisch/types';
|
||||
import {
|
||||
PureAbility,
|
||||
fieldPatternMatcher,
|
||||
mongoQueryMatcher,
|
||||
} from '@casl/ability';
|
||||
import { IUser } from 'types';
|
||||
|
||||
// Must be kept in sync with `packages/backend/src/helpers/user-ability.ts`!
|
||||
export default function userAbility(user: IUser) {
|
||||
@@ -9,7 +13,7 @@ export default function userAbility(user: IUser) {
|
||||
// We're not using mongo, but our fields, conditions match
|
||||
const options = {
|
||||
conditionsMatcher: mongoQueryMatcher,
|
||||
fieldMatcher: fieldPatternMatcher
|
||||
fieldMatcher: fieldPatternMatcher,
|
||||
};
|
||||
|
||||
if (!role || !permissions) {
|
||||
|
Reference in New Issue
Block a user