From a5ab6f2558001a689b9480d0cdc02d0ec7ddcf15 Mon Sep 17 00:00:00 2001
From: Michael Shamoon <4887959+shamoon@users.noreply.github.com>
Date: Fri, 9 Dec 2022 10:04:39 -0800
Subject: [PATCH] Add ability to set owner per object
---
src-ui/src/app/app.module.ts | 2 +
.../correspondent-edit-dialog.component.html | 14 +---
.../correspondent-edit-dialog.component.ts | 20 +++---
.../document-type-edit-dialog.component.html | 24 ++-----
.../document-type-edit-dialog.component.ts | 20 +++---
.../edit-dialog/edit-dialog.component.ts | 30 +++++++--
.../group-edit-dialog.component.ts | 9 ++-
.../mail-account-edit-dialog.component.ts | 9 ++-
.../mail-rule-edit-dialog.component.ts | 6 +-
.../storage-path-edit-dialog.component.html | 14 +---
.../storage-path-edit-dialog.component.ts | 20 +++---
.../tag-edit-dialog.component.html | 14 +---
.../tag-edit-dialog.component.ts | 20 +++---
.../user-edit-dialog.component.ts | 2 +-
.../permissions-form.component.html | 53 +++++++++++++++
.../permissions-form.component.scss | 0
.../permissions-form.component.ts | 66 +++++++++++++++++++
.../permissions-group.component.html | 28 ++++----
.../permissions-group.component.ts | 22 +------
.../permissions-user.component.html | 26 ++++----
.../permissions-user.component.ts | 21 +-----
.../common/input/select/select.component.html | 2 +-
.../permissions-dialog.component.html | 3 +
.../permissions-dialog.component.ts | 10 ++-
.../document-detail.component.html | 13 +---
.../document-detail.component.ts | 60 +++++++++++------
src/documents/permissions.py | 1 -
src/documents/serialisers.py | 4 +-
28 files changed, 293 insertions(+), 220 deletions(-)
create mode 100644 src-ui/src/app/components/common/input/permissions-form/permissions-form.component.html
create mode 100644 src-ui/src/app/components/common/input/permissions-form/permissions-form.component.scss
create mode 100644 src-ui/src/app/components/common/input/permissions-form/permissions-form.component.ts
diff --git a/src-ui/src/app/app.module.ts b/src-ui/src/app/app.module.ts
index c6b0c1484..46121a54f 100644
--- a/src-ui/src/app/app.module.ts
+++ b/src-ui/src/app/app.module.ts
@@ -109,6 +109,7 @@ import localeSv from '@angular/common/locales/sv'
import localeTr from '@angular/common/locales/tr'
import localeZh from '@angular/common/locales/zh'
import { PermissionsDialogComponent } from './components/common/permissions-dialog/permissions-dialog.component'
+import { PermissionsFormComponent } from './components/common/input/permissions-form/permissions-form.component'
registerLocaleData(localeBe)
registerLocaleData(localeCs)
@@ -205,6 +206,7 @@ function initializeApp(settings: SettingsService) {
IfOwnerDirective,
IfObjectPermissionsDirective,
PermissionsDialogComponent,
+ PermissionsFormComponent,
],
imports: [
BrowserModule,
diff --git a/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.html b/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.html
index 3867146a3..f1a3ee59d 100644
--- a/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.html
+++ b/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.html
@@ -12,19 +12,7 @@