@aristid/leav-types 1.6.0-30f53290 → 1.6.0-3d4e4455
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.
- package/apps/core/src/app/core/permissionApp/_types.d.ts +2 -1
- package/apps/core/src/domain/permission/_types.d.ts +1 -0
- package/apps/core/src/domain/permission/attributeDependentValuesPermissionDomain.d.ts +9 -1
- package/apps/core/src/domain/permission/permissionDomain.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { type IPermissionsTreeTarget, type PermissionsActions, type PermissionTypes } from '_types/permissions';
|
|
1
|
+
import { type IPermissionsDependenciesTreeTarget, type IPermissionsTreeTarget, type PermissionsActions, type PermissionTypes } from '_types/permissions';
|
|
2
2
|
export interface IInheritedPermissionsQueryParams {
|
|
3
3
|
type: PermissionTypes;
|
|
4
4
|
applyTo: string;
|
|
5
5
|
actions: PermissionsActions[];
|
|
6
6
|
userGroupNodeId: string;
|
|
7
7
|
permissionTreeTarget: IPermissionsTreeTarget;
|
|
8
|
+
dependenciesTreeTargets: IPermissionsDependenciesTreeTarget[];
|
|
8
9
|
}
|
|
@@ -123,6 +123,7 @@ export interface IGetInheritedPermissionsParams {
|
|
|
123
123
|
action: PermissionsActions;
|
|
124
124
|
userGroupId: string;
|
|
125
125
|
permissionTreeTarget?: IPermissionsTreeTarget;
|
|
126
|
+
dependenciesTreeTargets?: IPermissionsDependenciesTreeTarget[];
|
|
126
127
|
ctx: IQueryInfos;
|
|
127
128
|
}
|
|
128
129
|
export interface IIsAllowedParams {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type IQueryInfos } from '_types/queryInfos';
|
|
2
2
|
import { type IValueRepo } from 'infra/value/valueRepo';
|
|
3
|
-
import { type AttributeDependentValuesPermissionsActions } from '../../_types/permissions';
|
|
3
|
+
import { type AttributeDependentValuesPermissionsActions, type IPermissionsDependenciesTreeTarget, type IPermissionsTreeTarget } from '../../_types/permissions';
|
|
4
4
|
import { type IAttributeDomain } from '../attribute/attributeDomain';
|
|
5
5
|
import { type IPermissionByUserGroupsHelper } from './helpers/permissionByUserGroups';
|
|
6
6
|
import { type IElementAncestorsHelper } from 'domain/tree/helpers/elementAncestors';
|
|
@@ -15,6 +15,14 @@ export interface IAttributeDependentValuesPermissionDomain {
|
|
|
15
15
|
valueNodeId: string;
|
|
16
16
|
ctx: IQueryInfos;
|
|
17
17
|
}): Promise<boolean>;
|
|
18
|
+
getInheritedAttributeDependentValuesPermission(params: {
|
|
19
|
+
action: AttributeDependentValuesPermissionsActions;
|
|
20
|
+
attributeId: string;
|
|
21
|
+
userGroupId: string;
|
|
22
|
+
permissionTreeTarget: IPermissionsTreeTarget;
|
|
23
|
+
dependenciesTreeTargets: IPermissionsDependenciesTreeTarget[];
|
|
24
|
+
ctx: IQueryInfos;
|
|
25
|
+
}): Promise<boolean>;
|
|
18
26
|
}
|
|
19
27
|
export interface IRecordAttributePermissionDomainDeps {
|
|
20
28
|
'core.domain.permission.helpers.permissionByUserGroups': IPermissionByUserGroupsHelper;
|
|
@@ -23,7 +23,7 @@ export interface IPermissionDomain {
|
|
|
23
23
|
/**
|
|
24
24
|
* Retrieve herited permission: ignore permission defined on given element, force retrieval of herited permission
|
|
25
25
|
*/
|
|
26
|
-
getInheritedPermissions({ type, applyTo, action, userGroupId, permissionTreeTarget, ctx, }: IGetInheritedPermissionsParams): Promise<boolean>;
|
|
26
|
+
getInheritedPermissions({ type, applyTo, action, userGroupId, permissionTreeTarget, dependenciesTreeTargets, ctx, }: IGetInheritedPermissionsParams): Promise<boolean>;
|
|
27
27
|
isAllowed({ type, action, applyTo, target, ctx }: IIsAllowedParams): Promise<boolean>;
|
|
28
28
|
getActionsByType(params: IGetActionsByTypeParams): Promise<ILabeledPermissionsAction[]>;
|
|
29
29
|
registerActions(type: PermissionTypes, actions: string[], applyOn?: string[]): void;
|