mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
AAE-15221 Allow multiple roles when fetching deployed applications (#10503)
This commit is contained in:
parent
b7881db56b
commit
65b991674d
@ -36,11 +36,11 @@ export class AppsProcessCloudService {
|
||||
* Gets a list of deployed apps for this user by status.
|
||||
*
|
||||
* @param status Required status value
|
||||
* @param role to filter the apps
|
||||
* @param roles to filter the apps
|
||||
* @returns The list of deployed apps
|
||||
*/
|
||||
getDeployedApplicationsByStatus(status: string, role?: string): Observable<ApplicationInstanceModel[]> {
|
||||
return this.hasDeployedApps() ? of(this.deployedApps) : this.getApplicationsByStatus(status, role);
|
||||
getDeployedApplicationsByStatus(status: string, roles?: string | string[]): Observable<ApplicationInstanceModel[]> {
|
||||
return this.hasDeployedApps() ? of(this.deployedApps) : this.getApplicationsByStatus(status, roles);
|
||||
}
|
||||
|
||||
hasDeployedApps(): boolean {
|
||||
@ -66,13 +66,13 @@ export class AppsProcessCloudService {
|
||||
}
|
||||
}
|
||||
|
||||
private getApplicationsByStatus(status: string, role?: string): Observable<ApplicationInstanceModel[]> {
|
||||
private getApplicationsByStatus(status: string, roles?: string | string[]): Observable<ApplicationInstanceModel[]> {
|
||||
if (status === '') {
|
||||
return of([]);
|
||||
}
|
||||
const path = this.getApplicationUrl();
|
||||
const pathParams = {};
|
||||
const queryParams = { status, roles: role, sort: 'name' };
|
||||
const queryParams = { status, roles, sort: 'name' };
|
||||
const httpMethod = 'GET';
|
||||
const headerParams = {};
|
||||
const formParams = {};
|
||||
|
Loading…
x
Reference in New Issue
Block a user