siva kumar 3b455524b9 [ADF-3919] Add roles filtering to adf-cloud-group (#4238)
* [ADF-3919] Split group roles permission service into two

* [ADF-3909] Added roles filtering title input

* [ADF-3909] Added candate users and groups to task models

* [ADF-3909] Used group component in start task

* [ADF-3909] Updated docs

* [ADF-3909] Added disabling for multi selection

* [ADF-3909] Improved task creation logic

* [ADF-3909] Changed assignee selection mechanism

* * Added role filtering  to groups* Updated unit tests to the recent changes* Created getGroupDetailsById and checkGroupHasGivenRole in groupService* Updated unit test to the groupService

* * After rebase

* * Changed method name checkGroupHasGivenRole to  checkGroupHasRole

* * After rebase
2019-02-04 12:29:10 +00:00

2.4 KiB

Title, Added, Status, Last reviewed
Title Added Status Last reviewed
Group Cloud component v3.0.0 Experimental 2019-01-15

Group Cloud component

Searches Groups.

Basic Usage

<adf-cloud-group
    [appName]="'simple-app'"
    [mode]="'multiple'">
</adf-cloud-group>

adf-cloud-group

Class members

Properties

Name Type Default value Description
appName string Name of the application. If specified this shows the users who have access to the app.
mode string User selection mode (single/multiple).
preSelectGroups GroupModel[] [] Array of users to be pre-selected. This pre-selects all users in multi selection mode and only the first user of the array in single selection mode.
roles string[] Role names of the groups to be listed.
title string Title of the field

Events

Name Type Description
removeGroup EventEmitter<GroupModel> Emitted when a group is removed.
selectGroup EventEmitter<GroupModel> Emitted when a group is selected.

Details

Selection Mode

You can specify either single selection or multiple selection (single is the default):

Single selection

<adf-cloud-group></adf-cloud-group>

adf-cloud-group

Multiple selection

<adf-cloud-group
    [mode]="'multiple'">
</adf-cloud-group>

adf-cloud-group

Pre-selection

Usage example:

import { ObjectDataTableAdapter }  from '@alfresco/adf-core';

@Component({...})
export class MyComponent {
    groups: any;

    constructor() {
        this.groups =
            [
                {id: 1, name: 'Group 1'},
                {id: 2, name: 'Group 2'}
            ];
    }
}
<adf-cloud-group
    [mode]="'multiple'"
    [preSelectGroups]="groups">
</adf-cloud-group>