@aristid/leav-types 1.5.2 → 1.5.3-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44,6 +44,7 @@ export declare namespace auth {
44
44
  namespace cookie {
45
45
  let sameSite: string;
46
46
  let secure: boolean;
47
+ let withDomain: boolean;
47
48
  }
48
49
  let resetPasswordExpiration: string;
49
50
  namespace oidc {
@@ -126,6 +127,7 @@ export declare namespace permissions {
126
127
  }
127
128
  let enableCache_1: boolean;
128
129
  export { enableCache_1 as enableCache };
130
+ export let enableAccessRecordByDefaultBackendFilter: boolean;
129
131
  }
130
132
  export declare namespace amqp {
131
133
  namespace connOpt {
@@ -91,6 +91,12 @@ export interface IAuth {
91
91
  cookie: {
92
92
  sameSite: 'none' | 'lax' | 'strict';
93
93
  secure: boolean;
94
+ /**
95
+ * Do not set cookie domain to avoid sharing cookies between subdomains
96
+ * https://developer.mozilla.org/en-US/docs/Web/Security/Practical_implementation_guides/Cookies#domain
97
+ * @default false
98
+ */
99
+ withDomain: boolean;
94
100
  };
95
101
  resetPasswordExpiration: string;
96
102
  oidc: {
@@ -163,6 +169,7 @@ export interface IPermissions {
163
169
  everybody: IPermissionsByTypesAndActions;
164
170
  adminGroup: IPermissionsByTypesAndActions;
165
171
  enableCache: boolean;
172
+ enableAccessRecordByDefaultBackendFilter: boolean;
166
173
  }
167
174
  export interface IAmqp {
168
175
  connOpt: Options.Connect;
@@ -3,6 +3,7 @@ import { type IPermissionDomain } from 'domain/permission/permissionDomain';
3
3
  import { type IAppModule } from '_types/shared';
4
4
  import { PermissionTypes } from '../../../_types/permissions';
5
5
  import { type IGraphqlAppModule } from 'app/graphql/graphqlApp';
6
+ import { type GetSystemQueryContext } from '../../../utils/helpers/getSystemQueryContext';
6
7
  export interface IPluginPermission {
7
8
  name: string;
8
9
  type: PermissionTypes;
@@ -12,6 +13,7 @@ export type ICorePermissionApp = IAppModule & IGraphqlAppModule;
12
13
  interface IDeps {
13
14
  'core.domain.permission'?: IPermissionDomain;
14
15
  'core.domain.attribute'?: IAttributeDomain;
16
+ 'core.utils.getSystemQueryContext'?: GetSystemQueryContext;
15
17
  }
16
- export default function ({ 'core.domain.permission': permissionDomain, 'core.domain.attribute': attributeDomain, }?: IDeps): ICorePermissionApp;
18
+ export default function ({ 'core.domain.permission': permissionDomain, 'core.domain.attribute': attributeDomain, 'core.utils.getSystemQueryContext': getSystemQueryContext, }?: IDeps): ICorePermissionApp;
17
19
  export {};
@@ -132,6 +132,7 @@ export interface IIsAllowedParams {
132
132
  }
133
133
  export interface IGetActionsByTypeParams {
134
134
  type: PermissionTypes;
135
+ ctx: IQueryInfos;
135
136
  applyOn?: string;
136
137
  skipApplyOn?: boolean;
137
138
  }
@@ -24,7 +24,7 @@ export interface IPermissionDomain {
24
24
  */
25
25
  getInheritedPermissions({ type, applyTo, action, userGroupId, permissionTreeTarget, ctx, }: IGetInheritedPermissionsParams): Promise<boolean>;
26
26
  isAllowed({ type, action, applyTo, target, ctx }: IIsAllowedParams): Promise<boolean>;
27
- getActionsByType(params: IGetActionsByTypeParams): ILabeledPermissionsAction[];
27
+ getActionsByType(params: IGetActionsByTypeParams): Promise<ILabeledPermissionsAction[]>;
28
28
  registerActions(type: PermissionTypes, actions: string[], applyOn?: string[]): void;
29
29
  isAdminOrSystemUser(ctx: IQueryInfos): boolean;
30
30
  }
@@ -13,6 +13,7 @@ import { type ITreeRepo } from '../../../infra/tree/treeRepo';
13
13
  import { type GetCoreEntityByIdFunc } from '../../helpers/getCoreEntityById';
14
14
  import { type IElementAncestorsHelper } from '../../tree/helpers/elementAncestors';
15
15
  import { type IDefaultPermissionHelper } from '../../permission/helpers/defaultPermission';
16
+ import { type IConfig } from '_types/config';
16
17
  /**
17
18
  * Search records
18
19
  * Filters to apply on records selection
@@ -34,5 +35,6 @@ export interface IFindRecordsHelperDeps {
34
35
  'core.domain.tree.helpers.elementAncestors': IElementAncestorsHelper;
35
36
  'core.domain.permission.helpers.defaultPermission': IDefaultPermissionHelper;
36
37
  'core.infra.permission': IPermissionRepo;
38
+ config: IConfig;
37
39
  }
38
- export default function ({ 'core.domain.helpers.validate': validateHelper, 'core.domain.attribute': attributeDomain, 'core.domain.permission.helpers.defaultPermission': defaultPermHelper, 'core.infra.library': libraryRepo, 'core.domain.permission.library': libraryPermissionDomain, 'core.infra.record': recordRepo, 'core.domain.helpers.getCoreEntityById': getCoreEntityById, 'core.infra.tree': treeRepo, 'core.domain.tree.helpers.elementAncestors': elementAncestorsHelper, 'core.infra.permission': permissionRepo, 'core.utils': utils, }: IFindRecordsHelperDeps): FindRecordsHelper;
40
+ export default function ({ 'core.domain.helpers.validate': validateHelper, 'core.domain.attribute': attributeDomain, 'core.domain.permission.helpers.defaultPermission': defaultPermHelper, 'core.infra.library': libraryRepo, 'core.domain.permission.library': libraryPermissionDomain, 'core.infra.record': recordRepo, 'core.domain.helpers.getCoreEntityById': getCoreEntityById, 'core.infra.tree': treeRepo, 'core.domain.tree.helpers.elementAncestors': elementAncestorsHelper, 'core.infra.permission': permissionRepo, 'core.utils': utils, config, }: IFindRecordsHelperDeps): FindRecordsHelper;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aristid/leav-types",
3
- "version": "1.5.2",
3
+ "version": "1.5.3-1",
4
4
  "description": "Shared Leav types",
5
5
  "scripts": {
6
6
  "tscheck": "",
@@ -14,7 +14,7 @@
14
14
  "license": "LGPL3",
15
15
  "repository": "https://github.com/leav-solutions/leav-engine",
16
16
  "dependencies": {
17
- "@leav/utils": "1.5.2",
17
+ "@leav/utils": "1.5.3-1",
18
18
  "@types/amqplib": "0.10.7",
19
19
  "@types/express": "5.0.0",
20
20
  "@types/jest": "29.5.14",