Skip to content

Commit

Permalink
NAS-133792: DS groups are listed as available choices for auxiliary g…
Browse files Browse the repository at this point in the history
…roup membership

(cherry picked from commit 8fdf54b)
  • Loading branch information
undsoft authored and bugclerk committed Jan 26, 2025
1 parent d828869 commit 2189308
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
[label]="'Auxiliary Groups' | translate"
[tooltip]="tooltips.groups | translate"
[resolveValue]="true"
[resolveOptions]="localGroupOptions$"
[resolveOptions]="groupOptions$"
[autocompleteProvider]="autocompleteProvider"
></ix-chips>

Expand Down
10 changes: 3 additions & 7 deletions src/app/pages/credentials/users/user-form/user-form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,20 +169,16 @@ export class UserFormComponent implements OnInit {
smbBuiltin: helptextUsers.smbBuiltin,
};

readonly localGroupOptions$ = this.api.call('group.query', [[['local', '=', true]]]).pipe(
readonly groupOptions$ = this.api.call('group.query', [[['local', '=', true]]]).pipe(
map((groups) => groups.map((group) => ({ label: group.group, value: group.id }))),
);

shellOptions$: Observable<Option[]>;
readonly treeNodeProvider = this.filesystemService.getFilesystemNodeProvider({ directoriesOnly: true });
readonly groupProvider = new SimpleAsyncComboboxProvider(
this.api.call('group.query').pipe(
map((groups) => groups.map((group) => ({ label: group.group, value: group.id }))),
),
);
readonly groupProvider = new SimpleAsyncComboboxProvider(this.groupOptions$);

autocompleteProvider: ChipsProvider = (query: string) => {
return this.api.call('group.query', [[['name', '^', query]]]).pipe(
return this.api.call('group.query', [[['name', '^', query], ['local', '=', true]]]).pipe(
map((groups) => groups.map((group) => group.group)),
);
};
Expand Down

0 comments on commit 2189308

Please sign in to comment.