mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[MNT-24923] legal hold hold capabilities are not verified properly (#10930)
* [MNT-24923] Added possibility to filter capabilities by person id * [MNT-24923] Documentation and unit tests
This commit is contained in:
@@ -168,16 +168,22 @@ export class FilePlansApi extends BaseApi {
|
||||
*/
|
||||
getFilePlanRoles(filePlanId: string, parameters?: FilePlanRoleParameters): Promise<FilePlanRolePaging> {
|
||||
throwIfNotDefined(filePlanId, 'filePlanId');
|
||||
|
||||
const whereConditions: string[] = [];
|
||||
if (parameters?.where) {
|
||||
if (parameters.where.personId) {
|
||||
whereConditions.push(`personId='${parameters.where.personId}'`);
|
||||
}
|
||||
if (parameters.where.capabilityNames) {
|
||||
whereConditions.push(`capabilityName in (${parameters.where.capabilityNames.map((value) => "'" + value + "'").join(', ')})`);
|
||||
}
|
||||
}
|
||||
return this.get({
|
||||
path: '/file-plans/{filePlanId}/roles',
|
||||
pathParams: {
|
||||
filePlanId
|
||||
},
|
||||
queryParams: {
|
||||
where: parameters?.where?.capabilityNames
|
||||
? `(capabilityName in (${parameters.where.capabilityNames.map((value) => "'" + value + "'").join(', ')}))`
|
||||
: undefined
|
||||
where: whereConditions.length ? `(${whereConditions.join(' and ')})` : undefined
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@@ -3,6 +3,7 @@
|
||||
## Properties
|
||||
| Name | Type |
|
||||
|---------------------|----------|
|
||||
| **personId** | string |
|
||||
| **capabilityNames** | string[] |
|
||||
|
||||
|
||||
|
@@ -16,5 +16,6 @@
|
||||
*/
|
||||
|
||||
export interface FilePlanRoleParametersWhere {
|
||||
personId?: string;
|
||||
capabilityNames?: string[];
|
||||
}
|
||||
|
Reference in New Issue
Block a user