mftsccs-browser 2.2.36-beta → 2.2.38-beta
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/dist/main.bundle.js +1 -1
- package/dist/serviceWorker.bundle.js +1 -1
- package/dist/types/DataStructures/AccessControl/AccessControlModels.d.ts +33 -3
- package/dist/types/Services/AccessControl/APIClientService.d.ts +76 -1
- package/dist/types/Services/AccessControl/AccessControl.d.ts +49 -129
- package/package.json +1 -1
|
@@ -30,9 +30,9 @@ export interface BulkAccessRequest {
|
|
|
30
30
|
targets: BulkAccessTarget[];
|
|
31
31
|
}
|
|
32
32
|
export interface BulkCheckAccessRequest {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
accessIds: number[];
|
|
34
|
+
permission: string;
|
|
35
|
+
entityId?: number | null;
|
|
36
36
|
}
|
|
37
37
|
export interface AccessInheritanceRequest {
|
|
38
38
|
accessId?: number;
|
|
@@ -42,6 +42,36 @@ export interface AccessInheritanceRequest {
|
|
|
42
42
|
export interface SuperAdminRequest {
|
|
43
43
|
accessId?: number;
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Request model for parent access inheritance operations
|
|
47
|
+
* Mirrors C# ParentAccessInheritanceRequest
|
|
48
|
+
*/
|
|
49
|
+
export interface ParentAccessInheritanceRequest {
|
|
50
|
+
parentAccessId: number;
|
|
51
|
+
childAccessId?: number | null;
|
|
52
|
+
}
|
|
53
|
+
export interface ParentAccessInheritanceWithConceptRequest {
|
|
54
|
+
parentConceptId: number;
|
|
55
|
+
childConceptId?: number | null;
|
|
56
|
+
}
|
|
57
|
+
export interface BulkParentAccessInheritanceWithConceptRequest {
|
|
58
|
+
parentConceptId: number;
|
|
59
|
+
childConceptIds: number[];
|
|
60
|
+
}
|
|
61
|
+
export interface BulkParentAccessInheritanceResult {
|
|
62
|
+
childConceptId: number;
|
|
63
|
+
accessId: number;
|
|
64
|
+
success: boolean;
|
|
65
|
+
message?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface SuperAdminWithConceptRequest {
|
|
68
|
+
conceptId: number;
|
|
69
|
+
}
|
|
70
|
+
export interface AccessInheritanceWithConceptRequest {
|
|
71
|
+
conceptId: number;
|
|
72
|
+
connectionTypeId?: number;
|
|
73
|
+
enable?: boolean;
|
|
74
|
+
}
|
|
45
75
|
export interface ConceptAccessRequest {
|
|
46
76
|
conceptIds: number;
|
|
47
77
|
permission: string;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This is the TypeScript equivalent of the C# APIClientService class.
|
|
8
8
|
*/
|
|
9
|
-
import { AccessRequest, AccessResult, AccessControlAPIResponse, BulkAccessRequest, BulkCheckAccessRequest, AccessInheritanceRequest, SuperAdminRequest, BulkConceptAccessRequest, ConceptAccessRequest } from '../../DataStructures/AccessControl/AccessControlModels';
|
|
9
|
+
import { AccessRequest, AccessResult, AccessControlAPIResponse, BulkAccessRequest, BulkCheckAccessRequest, AccessInheritanceRequest, SuperAdminRequest, BulkConceptAccessRequest, ConceptAccessRequest, ParentAccessInheritanceRequest, ParentAccessInheritanceWithConceptRequest, BulkParentAccessInheritanceWithConceptRequest, BulkParentAccessInheritanceResult, SuperAdminWithConceptRequest, AccessInheritanceWithConceptRequest } from '../../DataStructures/AccessControl/AccessControlModels';
|
|
10
10
|
export interface IAPIClientService {
|
|
11
11
|
assignAccessAsync(request: AccessRequest): Promise<AccessControlAPIResponse<AccessResult>>;
|
|
12
12
|
checkAccessAsync(request: AccessRequest): Promise<AccessControlAPIResponse<AccessResult>>;
|
|
@@ -22,6 +22,21 @@ export interface IAPIClientService {
|
|
|
22
22
|
assignSuperAdminAccessAsync(request: SuperAdminRequest): Promise<AccessControlAPIResponse>;
|
|
23
23
|
revokeSuperAdminAccessAsync(request: SuperAdminRequest): Promise<AccessControlAPIResponse>;
|
|
24
24
|
checkSuperAdminStatusAsync(accessId: number): Promise<AccessControlAPIResponse>;
|
|
25
|
+
setParentAccessInheritanceAsync(request: ParentAccessInheritanceRequest): Promise<AccessControlAPIResponse>;
|
|
26
|
+
removeParentAccessInheritanceAsync(accessId: number, parentAccessId?: number): Promise<AccessControlAPIResponse>;
|
|
27
|
+
hasParentAccessInheritanceAsync(accessId: number, parentAccessId?: number): Promise<AccessControlAPIResponse>;
|
|
28
|
+
getParentAccessIdAsync(accessId: number): Promise<AccessControlAPIResponse>;
|
|
29
|
+
setParentAccessInheritanceByConceptAsync(request: ParentAccessInheritanceWithConceptRequest): Promise<AccessControlAPIResponse>;
|
|
30
|
+
setParentAccessInheritanceBulkByConceptAsync(request: BulkParentAccessInheritanceWithConceptRequest): Promise<AccessControlAPIResponse<BulkParentAccessInheritanceResult[]>>;
|
|
31
|
+
removeParentAccessInheritanceByConceptAsync(childConceptId: number, parentConceptId?: number): Promise<AccessControlAPIResponse>;
|
|
32
|
+
removeParentAccessInheritanceBulkByConceptAsync(request: BulkParentAccessInheritanceWithConceptRequest): Promise<AccessControlAPIResponse<BulkParentAccessInheritanceResult[]>>;
|
|
33
|
+
hasParentAccessInheritanceByConceptAsync(childConceptId: number, parentConceptId?: number): Promise<AccessControlAPIResponse>;
|
|
34
|
+
getParentAccessIdByConceptAsync(childConceptId: number): Promise<AccessControlAPIResponse>;
|
|
35
|
+
assignSuperAdminByConceptAsync(request: SuperAdminWithConceptRequest): Promise<AccessControlAPIResponse>;
|
|
36
|
+
revokeSuperAdminByConceptAsync(request: SuperAdminWithConceptRequest): Promise<AccessControlAPIResponse>;
|
|
37
|
+
checkSuperAdminByConceptAsync(conceptId: number): Promise<AccessControlAPIResponse>;
|
|
38
|
+
setAccessInheritanceByConceptAsync(request: AccessInheritanceWithConceptRequest): Promise<AccessControlAPIResponse>;
|
|
39
|
+
getAccessInheritanceStatusByConceptAsync(conceptId: number, connectionTypeId?: number): Promise<AccessControlAPIResponse>;
|
|
25
40
|
}
|
|
26
41
|
export declare class APIClientService implements IAPIClientService {
|
|
27
42
|
private static get baseUrl();
|
|
@@ -88,5 +103,65 @@ export declare class APIClientService implements IAPIClientService {
|
|
|
88
103
|
* Revoke access records for multiple concepts in bulk
|
|
89
104
|
*/
|
|
90
105
|
revokeConceptAccessBulkAsync(request: BulkConceptAccessRequest): Promise<AccessControlAPIResponse<AccessResult[]>>;
|
|
106
|
+
/**
|
|
107
|
+
* Set parent access inheritance link
|
|
108
|
+
*/
|
|
109
|
+
setParentAccessInheritanceAsync(request: ParentAccessInheritanceRequest): Promise<AccessControlAPIResponse>;
|
|
110
|
+
/**
|
|
111
|
+
* Remove parent access inheritance link
|
|
112
|
+
*/
|
|
113
|
+
removeParentAccessInheritanceAsync(accessId: number, parentAccessId?: number): Promise<AccessControlAPIResponse>;
|
|
114
|
+
/**
|
|
115
|
+
* Check if parent access inheritance link exists
|
|
116
|
+
*/
|
|
117
|
+
hasParentAccessInheritanceAsync(accessId: number, parentAccessId?: number): Promise<AccessControlAPIResponse>;
|
|
118
|
+
/**
|
|
119
|
+
* Get the parent access ID for a given access ID
|
|
120
|
+
*/
|
|
121
|
+
getParentAccessIdAsync(accessId: number): Promise<AccessControlAPIResponse>;
|
|
122
|
+
/**
|
|
123
|
+
* Set parent access inheritance by concept IDs (server resolves conceptId → accessId)
|
|
124
|
+
*/
|
|
125
|
+
setParentAccessInheritanceByConceptAsync(request: ParentAccessInheritanceWithConceptRequest): Promise<AccessControlAPIResponse>;
|
|
126
|
+
/**
|
|
127
|
+
* Set parent access inheritance for multiple children with one parent (concept-based)
|
|
128
|
+
*/
|
|
129
|
+
setParentAccessInheritanceBulkByConceptAsync(request: BulkParentAccessInheritanceWithConceptRequest): Promise<AccessControlAPIResponse<BulkParentAccessInheritanceResult[]>>;
|
|
130
|
+
/**
|
|
131
|
+
* Remove parent access inheritance by concept IDs
|
|
132
|
+
*/
|
|
133
|
+
removeParentAccessInheritanceByConceptAsync(childConceptId: number, parentConceptId?: number): Promise<AccessControlAPIResponse>;
|
|
134
|
+
/**
|
|
135
|
+
* Remove parent access inheritance for multiple children (concept-based)
|
|
136
|
+
*/
|
|
137
|
+
removeParentAccessInheritanceBulkByConceptAsync(request: BulkParentAccessInheritanceWithConceptRequest): Promise<AccessControlAPIResponse<BulkParentAccessInheritanceResult[]>>;
|
|
138
|
+
/**
|
|
139
|
+
* Check if parent access inheritance exists by concept IDs
|
|
140
|
+
*/
|
|
141
|
+
hasParentAccessInheritanceByConceptAsync(childConceptId: number, parentConceptId?: number): Promise<AccessControlAPIResponse>;
|
|
142
|
+
/**
|
|
143
|
+
* Get the parent access ID by child concept ID
|
|
144
|
+
*/
|
|
145
|
+
getParentAccessIdByConceptAsync(childConceptId: number): Promise<AccessControlAPIResponse>;
|
|
146
|
+
/**
|
|
147
|
+
* Assign super admin by concept ID
|
|
148
|
+
*/
|
|
149
|
+
assignSuperAdminByConceptAsync(request: SuperAdminWithConceptRequest): Promise<AccessControlAPIResponse>;
|
|
150
|
+
/**
|
|
151
|
+
* Revoke super admin by concept ID
|
|
152
|
+
*/
|
|
153
|
+
revokeSuperAdminByConceptAsync(request: SuperAdminWithConceptRequest): Promise<AccessControlAPIResponse>;
|
|
154
|
+
/**
|
|
155
|
+
* Check super admin status by concept ID
|
|
156
|
+
*/
|
|
157
|
+
checkSuperAdminByConceptAsync(conceptId: number): Promise<AccessControlAPIResponse>;
|
|
158
|
+
/**
|
|
159
|
+
* Set access inheritance by concept ID
|
|
160
|
+
*/
|
|
161
|
+
setAccessInheritanceByConceptAsync(request: AccessInheritanceWithConceptRequest): Promise<AccessControlAPIResponse>;
|
|
162
|
+
/**
|
|
163
|
+
* Get access inheritance status by concept ID
|
|
164
|
+
*/
|
|
165
|
+
getAccessInheritanceStatusByConceptAsync(conceptId: number, connectionTypeId?: number): Promise<AccessControlAPIResponse>;
|
|
91
166
|
}
|
|
92
167
|
export default APIClientService;
|
|
@@ -2,21 +2,22 @@
|
|
|
2
2
|
* AccessControlService
|
|
3
3
|
*
|
|
4
4
|
* This service provides access control functionality including:
|
|
5
|
-
* -
|
|
5
|
+
* - 5-phase bulk access check with BFS inheritance graph traversal
|
|
6
6
|
* - Assign and revoke access permissions
|
|
7
7
|
* - Bulk operations for access management
|
|
8
8
|
* - Super admin checks
|
|
9
|
-
* - Access inheritance management
|
|
9
|
+
* - Access inheritance management (including parent access inheritance)
|
|
10
10
|
*
|
|
11
|
-
* This is the TypeScript equivalent of the C# AccessControlService class.
|
|
11
|
+
* This is the TypeScript equivalent of the C# AccessControlService class (v3.4.0).
|
|
12
12
|
*/
|
|
13
|
-
import { AccessResult, BulkConceptAccessRequest } from '../../DataStructures/AccessControl/AccessControlModels';
|
|
13
|
+
import { AccessResult, BulkConceptAccessRequest, BulkParentAccessInheritanceResult } from '../../DataStructures/AccessControl/AccessControlModels';
|
|
14
14
|
import { IAPIClientService } from './APIClientService';
|
|
15
15
|
/**
|
|
16
16
|
* Interface for the Access Control Service
|
|
17
17
|
*/
|
|
18
18
|
export interface IAccessControlService {
|
|
19
19
|
checkAccess(conceptId: number, permission: string, entityId?: number | null): Promise<boolean>;
|
|
20
|
+
checkAccessBulk(conceptIds: number[], permission: string, entityId?: number | null): Promise<Map<number, boolean>>;
|
|
20
21
|
getConceptIdsWithPermission(permission: string, conceptIdsFilter: number[], entityId?: number | null): Promise<number[]>;
|
|
21
22
|
assignAccess(request: BulkConceptAccessRequest): Promise<AccessResult[]>;
|
|
22
23
|
revokeAccess(conceptId: number, permission: string, entityId?: number | null): Promise<boolean>;
|
|
@@ -24,6 +25,12 @@ export interface IAccessControlService {
|
|
|
24
25
|
setAccessInheritance(conceptId: number): Promise<boolean>;
|
|
25
26
|
getAccessInheritanceStatus(conceptId: number, connectionTypeId?: number): Promise<boolean>;
|
|
26
27
|
setAccessInheritanceStatus(conceptId: number, isEnabled: boolean, connectionTypeId?: number): Promise<boolean>;
|
|
28
|
+
setParentAccessInheritance(conceptId: number, parentConceptId: number): Promise<number>;
|
|
29
|
+
setParentAccessInheritanceBulk(childConceptIds: number[], parentConceptId: number): Promise<BulkParentAccessInheritanceResult[]>;
|
|
30
|
+
removeParentAccessInheritance(conceptId: number, parentConceptId?: number): Promise<string>;
|
|
31
|
+
removeParentAccessInheritanceBulk(childConceptIds: number[], parentConceptId?: number): Promise<BulkParentAccessInheritanceResult[]>;
|
|
32
|
+
hasParentAccessInheritance(conceptId: number, parentConceptId?: number): Promise<boolean>;
|
|
33
|
+
getParentAccessId(conceptId: number): Promise<number | null>;
|
|
27
34
|
isSuperAdmin(entityId: number): Promise<boolean>;
|
|
28
35
|
assignSuperAdmin(entityId: number): Promise<number>;
|
|
29
36
|
revokeSuperAdmin(entityId: number): Promise<string>;
|
|
@@ -32,156 +39,69 @@ export declare class AccessControlService implements IAccessControlService {
|
|
|
32
39
|
private readonly apiClient;
|
|
33
40
|
constructor(apiClient?: IAPIClientService);
|
|
34
41
|
/**
|
|
35
|
-
* Check whether a user/entity has the specified permission.
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* @param conceptId - The ID of the concept to check access for
|
|
39
|
-
* @param permission - The permission to check (read, write, execute, delete)
|
|
40
|
-
* @param entityId - Optional entity ID to check access for
|
|
41
|
-
* @returns Promise<boolean> - True if access is granted, false otherwise
|
|
42
|
+
* Check whether a user/entity has the specified permission on a single concept.
|
|
43
|
+
* Delegates to checkAccessBulk for full inheritance + group resolution.
|
|
42
44
|
*/
|
|
43
45
|
checkAccess(conceptId: number, permission: string, entityId?: number | null): Promise<boolean>;
|
|
44
46
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
+
* 5-phase bulk access check algorithm.
|
|
48
|
+
* Matches the C# AccessControlService.CheckAccessBulk implementation.
|
|
47
49
|
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
50
|
+
* Phase 1: Super-admin short-circuit
|
|
51
|
+
* Phase 2: Fast-path classification (owner, public, type concepts)
|
|
52
|
+
* Phase 3: BFS inheritance graph resolution (3 sources)
|
|
53
|
+
* Phase 4: Bulk access decision resolution (API)
|
|
54
|
+
* Phase 5: Grant-only merge per concept
|
|
52
55
|
*/
|
|
53
|
-
|
|
56
|
+
checkAccessBulk(conceptIds: number[], permission: string, entityId?: number | null): Promise<Map<number, boolean>>;
|
|
54
57
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* @param request - Bulk access request containing targets
|
|
58
|
-
* @returns Promise<AccessResult[]> - Array of access results
|
|
58
|
+
* Get all conceptIds which have a certain permission for an entity.
|
|
59
|
+
* Delegates to checkAccessBulk for full inheritance support.
|
|
59
60
|
*/
|
|
60
|
-
|
|
61
|
+
getConceptIdsWithPermission(permission: string, conceptIdsFilter: number[], entityId?: number | null): Promise<number[]>;
|
|
61
62
|
/**
|
|
62
|
-
*
|
|
63
|
+
* Resolve inheritance graph via 3-source BFS, depth-limited to MAX_BFS_DEPTH.
|
|
63
64
|
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* @returns Promise<boolean> - True if successfully revoked, false otherwise
|
|
65
|
+
* Source 1: FreeSchema internal connections ("the_parent_access_inheritance")
|
|
66
|
+
* Source 2: Explicit parent access links (via Access API)
|
|
67
|
+
* Source 3: Concept-connection access inheritance
|
|
68
68
|
*/
|
|
69
|
+
private resolveBulkInheritanceGraph;
|
|
70
|
+
private resolveBulkDecisions;
|
|
71
|
+
private resolveSubjects;
|
|
72
|
+
private hasAnyGrant;
|
|
73
|
+
assignAccess(request: BulkConceptAccessRequest): Promise<AccessResult[]>;
|
|
69
74
|
revokeAccess(conceptId: number, permission: string, entityId?: number | null): Promise<boolean>;
|
|
70
75
|
revokeAccessBulk(request: BulkConceptAccessRequest): Promise<AccessResult[]>;
|
|
71
|
-
/**
|
|
72
|
-
* Set access inheritance for a concept
|
|
73
|
-
*
|
|
74
|
-
* @param conceptId - The concept ID to set inheritance for
|
|
75
|
-
* @returns Promise<boolean> - True if successful, false otherwise
|
|
76
|
-
*/
|
|
77
76
|
setAccessInheritance(conceptId: number): Promise<boolean>;
|
|
78
|
-
/**
|
|
79
|
-
* Get access inheritance status for a concept
|
|
80
|
-
*
|
|
81
|
-
* @param conceptId - The concept ID to check
|
|
82
|
-
* @param connectionTypeId - The connection type ID (default: 999)
|
|
83
|
-
* @returns Promise<boolean> - True if inheritance is enabled, false otherwise
|
|
84
|
-
*/
|
|
85
77
|
getAccessInheritanceStatus(conceptId: number, connectionTypeId?: number): Promise<boolean>;
|
|
86
|
-
/**
|
|
87
|
-
* Set access inheritance status for a concept
|
|
88
|
-
*
|
|
89
|
-
* @param conceptId - The concept ID to set inheritance status for
|
|
90
|
-
* @param isEnabled - Whether to enable or disable inheritance
|
|
91
|
-
* @param connectionTypeId - The connection type ID (default: 999)
|
|
92
|
-
* @returns Promise<boolean> - True if successful, false otherwise
|
|
93
|
-
*/
|
|
94
78
|
setAccessInheritanceStatus(conceptId: number, isEnabled: boolean, connectionTypeId?: number): Promise<boolean>;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
79
|
+
setParentAccessInheritance(conceptId: number, parentConceptId: number): Promise<number>;
|
|
80
|
+
setParentAccessInheritanceBulk(childConceptIds: number[], parentConceptId: number): Promise<BulkParentAccessInheritanceResult[]>;
|
|
81
|
+
removeParentAccessInheritance(conceptId: number, parentConceptId?: number): Promise<string>;
|
|
82
|
+
removeParentAccessInheritanceBulk(childConceptIds: number[], parentConceptId?: number): Promise<BulkParentAccessInheritanceResult[]>;
|
|
83
|
+
hasParentAccessInheritance(conceptId: number, parentConceptId?: number): Promise<boolean>;
|
|
84
|
+
getParentAccessId(conceptId: number): Promise<number | null>;
|
|
101
85
|
isSuperAdmin(entityId: number): Promise<boolean>;
|
|
102
|
-
/**
|
|
103
|
-
* Assign super admin access to an entity
|
|
104
|
-
*
|
|
105
|
-
* @param entityId - The entity ID to grant super admin access to
|
|
106
|
-
* @returns Promise<number> - The entity ID if successful, 0 otherwise
|
|
107
|
-
*/
|
|
108
86
|
assignSuperAdmin(entityId: number): Promise<number>;
|
|
109
|
-
/**
|
|
110
|
-
* Revoke super admin access from an entity
|
|
111
|
-
*
|
|
112
|
-
* @param entityId - The entity ID to revoke super admin access from
|
|
113
|
-
* @returns Promise<string> - Success message or error message
|
|
114
|
-
*/
|
|
115
87
|
revokeSuperAdmin(entityId: number): Promise<string>;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
* @param accessId - The access ID to check
|
|
120
|
-
* @param permission - The permission to check
|
|
121
|
-
* @param entityId - Optional entity ID
|
|
122
|
-
* @returns Promise<boolean> - True if access is granted, false otherwise
|
|
123
|
-
*/
|
|
124
|
-
private checkAccessInternal;
|
|
125
|
-
/**
|
|
126
|
-
* Static method to check if an entity is a super admin
|
|
127
|
-
* Uses the default singleton instance
|
|
128
|
-
*
|
|
129
|
-
* @param entityId - The entity ID to check
|
|
130
|
-
* @returns Promise<boolean> - True if super admin, false otherwise
|
|
131
|
-
*/
|
|
88
|
+
makeConceptPrivate(conceptId: number): Promise<boolean>;
|
|
89
|
+
private static parseBoolData;
|
|
90
|
+
private static parseIntData;
|
|
132
91
|
static isSuperAdmin(entityId: number): Promise<boolean>;
|
|
133
|
-
/**
|
|
134
|
-
* Static method to assign super admin access
|
|
135
|
-
* Uses the default singleton instance
|
|
136
|
-
*
|
|
137
|
-
* @param entityId - The entity ID to grant super admin access to
|
|
138
|
-
* @returns Promise<number> - The entity ID if successful, 0 otherwise
|
|
139
|
-
*/
|
|
140
92
|
static assignSuperAdmin(entityId: number): Promise<number>;
|
|
141
|
-
/**
|
|
142
|
-
* Static method to revoke super admin access
|
|
143
|
-
* Uses the default singleton instance
|
|
144
|
-
*
|
|
145
|
-
* @param entityId - The entity ID to revoke super admin access from
|
|
146
|
-
* @returns Promise<string> - Success message or error message
|
|
147
|
-
*/
|
|
148
93
|
static revokeSuperAdmin(entityId: number): Promise<string>;
|
|
149
|
-
/**
|
|
150
|
-
* Static method to check access
|
|
151
|
-
* Uses the default singleton instance
|
|
152
|
-
*
|
|
153
|
-
* @param conceptId - The concept ID to check access for
|
|
154
|
-
* @param permission - The permission to check
|
|
155
|
-
* @param entityId - Optional entity ID
|
|
156
|
-
* @returns Promise<boolean> - True if access is granted, false otherwise
|
|
157
|
-
*/
|
|
158
94
|
static checkAccess(conceptId: number, permission: string, entityId?: number | null): Promise<boolean>;
|
|
159
|
-
|
|
160
|
-
* Static method to assign access in bulk
|
|
161
|
-
* Uses the default singleton instance
|
|
162
|
-
*
|
|
163
|
-
* @param request - BulkConceptAccessRequest containing conceptIds and permissions
|
|
164
|
-
* @returns Promise<AccessResult[]> - Array of access results
|
|
165
|
-
*/
|
|
95
|
+
static checkAccessBulk(conceptIds: number[], permission: string, entityId?: number | null): Promise<Map<number, boolean>>;
|
|
166
96
|
static assignAccess(request: BulkConceptAccessRequest): Promise<AccessResult[]>;
|
|
167
|
-
/**
|
|
168
|
-
* Static method to revoke access
|
|
169
|
-
* Uses the default singleton instance
|
|
170
|
-
*
|
|
171
|
-
* @param conceptId - The concept ID to revoke access for
|
|
172
|
-
* @param permission - The permission to revoke
|
|
173
|
-
* @param entityId - Optional entity ID
|
|
174
|
-
* @returns Promise<boolean> - True if successfully revoked, false otherwise
|
|
175
|
-
*/
|
|
176
97
|
static revokeAccess(conceptId: number, permission: string, entityId?: number | null): Promise<boolean>;
|
|
177
|
-
/**
|
|
178
|
-
* Static method to revoke concept access in bulk
|
|
179
|
-
* Uses the default singleton instance
|
|
180
|
-
*
|
|
181
|
-
* @param request - BulkConceptAccessRequest containing conceptIds and permissions
|
|
182
|
-
* @returns Promise<AccessResult[]> - Array of access results
|
|
183
|
-
*/
|
|
184
98
|
static revokeAccessBulk(request: BulkConceptAccessRequest): Promise<AccessResult[]>;
|
|
99
|
+
static setParentAccessInheritance(conceptId: number, parentConceptId: number): Promise<number>;
|
|
100
|
+
static setParentAccessInheritanceBulk(childConceptIds: number[], parentConceptId: number): Promise<BulkParentAccessInheritanceResult[]>;
|
|
101
|
+
static removeParentAccessInheritance(conceptId: number, parentConceptId?: number): Promise<string>;
|
|
102
|
+
static removeParentAccessInheritanceBulk(childConceptIds: number[], parentConceptId?: number): Promise<BulkParentAccessInheritanceResult[]>;
|
|
103
|
+
static hasParentAccessInheritance(conceptId: number, parentConceptId?: number): Promise<boolean>;
|
|
104
|
+
static getParentAccessId(conceptId: number): Promise<number | null>;
|
|
185
105
|
}
|
|
186
106
|
/**
|
|
187
107
|
* Get the default singleton instance of AccessControlService
|