loadAttachedPermissions(permissionList) {
    this.permissions = this.LogsRolesService.getNewPermissions();
    permissionList.forEach((permission) => {
      if (permission.index) {
        _.extend(permission.index, { permissionId: permission.permissionId });
        this.permissions.index.push(permission.index);
      }
      if (permission.alias) {
        _.extend(permission.alias, { permissionId: permission.permissionId });
        this.permissions.alias.push(permission.alias);
      }
      if (permission.stream) {
        _.extend(permission.stream, { permissionId: permission.permissionId });
        this.permissions.stream.push(permission.stream);
      }
      if (permission.dashboard) {
        _.extend(permission.dashboard, { permissionId: permission.permissionId });
        this.permissions.dashboard.push(permission.dashboard);
      }
    });
    this.attachedIndices.resolve(this.permissions.index);
    this.attachedAliases.resolve(this.permissions.alias);
    this.attachedDashboards.resolve(this.permissions.dashboard);
    this.attachedStreams.resolve(this.permissions.stream);
  }
/**
   * initializes and loads list of permissions
   * adding permissionId to the object of index, alias, dashboard and stream so as to use it to
   * remove permission later
   * @memberof LogsRolesPermissionsCtrl
   */
initializes and loads list of permissions
adding permissionId to the object of index, alias, dashboard and stream so as to use it to
remove permission later
@memberof LogsRolesPermissionsCtrl
initializes and loads list of permissions adding permissionId to the object of index alias dashboard and stream so as to use it to remove permission later @memberof LogsRolesPermissionsCtrl
loadAttachedPermissions(permissionList) {
    this.permissions = this.LogsRolesService.getNewPermissions();
    permissionList.forEach((permission) => {
      if (permission.index) {
        _.extend(permission.index, { permissionId: permission.permissionId });
        this.permissions.index.push(permission.index);
      }
      if (permission.alias) {
        _.extend(permission.alias, { permissionId: permission.permissionId });
        this.permissions.alias.push(permission.alias);
      }
      if (permission.stream) {
        _.extend(permission.stream, { permissionId: permission.permissionId });
        this.permissions.stream.push(permission.stream);
      }
      if (permission.dashboard) {
        _.extend(permission.dashboard, { permissionId: permission.permissionId });
        this.permissions.dashboard.push(permission.dashboard);
      }
    });
    this.attachedIndices.resolve(this.permissions.index);
    this.attachedAliases.resolve(this.permissions.alias);
    this.attachedDashboards.resolve(this.permissions.dashboard);
    this.attachedStreams.resolve(this.permissions.stream);
  }
loadAttachedPermissions ( permissionList ) { this . permissions = this . LogsRolesService . getNewPermissions ( ) ; permissionList . forEach ( ( permission ) => { if ( permission . index ) { _ . extend ( permission . index , { permissionId : permission . permissionId } ) ; this . permissions . index . push ( permission . index ) ; } if ( permission . alias ) { _ . extend ( permission . alias , { permissionId : permission . permissionId } ) ; this . permissions . alias . push ( permission . alias ) ; } if ( permission . stream ) { _ . extend ( permission . stream , { permissionId : permission . permissionId } ) ; this . permissions . stream . push ( permission . stream ) ; } if ( permission . dashboard ) { _ . extend ( permission . dashboard , { permissionId : permission . permissionId } ) ; this . permissions . dashboard . push ( permission . dashboard ) ; } } ) ; this . attachedIndices . resolve ( this . permissions . index ) ; this . attachedAliases . resolve ( this . permissions . alias ) ; this . attachedDashboards . resolve ( this . permissions . dashboard ) ; this . attachedStreams . resolve ( this . permissions . stream ) ; }
initializes and loads list of permissions
 adding permissionId to the object of index, alias, dashboard and stream so as to use it to
 remove permission later
 @memberof LogsRolesPermissionsCtrl
initializes and loads list of permissions adding permissionId to the object of index alias dashboard and stream so as to use it to remove permission later @memberof LogsRolesPermissionsCtrl