mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	fix object creation, user serialization, user creation
This commit is contained in:
		| @@ -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( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Michael Shamoon
					Michael Shamoon