Skip to content

Commit

Permalink
NAS-129686: Error handling fix and explanative commentary for BOTH
Browse files Browse the repository at this point in the history
(cherry picked from commit 715a321)
  • Loading branch information
bvasilenko authored and bugclerk committed Jul 5, 2024
1 parent f0033e8 commit 8b23844
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/enums/nfs-acl.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export enum NfsAclTag {
Everyone = 'everyone@',
User = 'USER',
UserGroup = 'GROUP',
Both = 'BOTH',
Both = 'BOTH', // middleware returns `ID_TYPE_BOTH` when it is not possible to determine whether an AD entity is a user or a group
}

export const nfsAclTagLabels = new Map<NfsAclTag, string>([
Expand Down
5 changes: 3 additions & 2 deletions src/app/pages/sharing/smb/smb-acl/smb-acl.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,11 @@ export class SmbAclComponent implements OnInit {
this.form.controls.entries.removeAt(index);
}

async onSubmit(): Promise<void> {
onSubmit(): void {
this.isLoading = true;

of(await this.getAclEntriesFromForm())
of(undefined)
.pipe(mergeMap(() => this.getAclEntriesFromForm()))
.pipe(mergeMap((acl) => this.ws.call('sharing.smb.setacl', [{ share_name: this.shareAclName, share_acl: acl }])))
.pipe(untilDestroyed(this))
.subscribe({
Expand Down

0 comments on commit 8b23844

Please sign in to comment.