mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-14 10:36:58 +01:00
fix object creation, user serialization, user creation
This commit is contained in:
parent
8fad13b500
commit
1adb5e724d
4 changed files with 15 additions and 6 deletions
|
|
@ -52,8 +52,8 @@ export class UserEditDialogComponent
|
|||
last_name: new FormControl(''),
|
||||
is_active: new FormControl(true),
|
||||
is_superuser: new FormControl(false),
|
||||
groups: new FormControl(null),
|
||||
user_permissions: new FormControl(null),
|
||||
groups: new FormControl([]),
|
||||
user_permissions: new FormControl([]),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export interface PermissionsObject {
|
|||
}
|
||||
|
||||
export interface ObjectWithPermissions extends ObjectWithId {
|
||||
owner?: PaperlessUser
|
||||
owner?: number
|
||||
|
||||
permissions?: PermissionsObject
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ export class PermissionsService {
|
|||
}
|
||||
|
||||
public currentUserOwnsObject(object: ObjectWithPermissions): boolean {
|
||||
return !object || !object.owner || object.owner.id === this.currentUser.id
|
||||
return !object || !object.owner || object.owner === this.currentUser.id
|
||||
}
|
||||
|
||||
public currentUserHasObjectPermissions(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue