mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Unify API perm endpoint to set_permissions
, initial frontend support for doc sharing
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ObjectWithId } from './object-with-id'
|
||||
import { ObjectWithPermissions } from './object-with-permissions'
|
||||
|
||||
export const MATCH_ANY = 1
|
||||
export const MATCH_ALL = 2
|
||||
@@ -41,7 +41,7 @@ export const MATCHING_ALGORITHMS = [
|
||||
},
|
||||
]
|
||||
|
||||
export interface MatchingModel extends ObjectWithId {
|
||||
export interface MatchingModel extends ObjectWithPermissions {
|
||||
name?: string
|
||||
|
||||
slug?: string
|
||||
|
8
src-ui/src/app/data/object-with-permissions.ts
Normal file
8
src-ui/src/app/data/object-with-permissions.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { ObjectWithId } from './object-with-id'
|
||||
import { PaperlessUser } from './paperless-user'
|
||||
|
||||
export interface ObjectWithPermissions extends ObjectWithId {
|
||||
user?: PaperlessUser
|
||||
|
||||
permissions?: Array<[number, string]>
|
||||
}
|
@@ -1,9 +1,9 @@
|
||||
import { PaperlessCorrespondent } from './paperless-correspondent'
|
||||
import { ObjectWithId } from './object-with-id'
|
||||
import { PaperlessTag } from './paperless-tag'
|
||||
import { PaperlessDocumentType } from './paperless-document-type'
|
||||
import { Observable } from 'rxjs'
|
||||
import { PaperlessStoragePath } from './paperless-storage-path'
|
||||
import { ObjectWithPermissions } from './object-with-permissions'
|
||||
|
||||
export interface SearchHit {
|
||||
score?: number
|
||||
@@ -12,7 +12,7 @@ export interface SearchHit {
|
||||
highlights?: string
|
||||
}
|
||||
|
||||
export interface PaperlessDocument extends ObjectWithId {
|
||||
export interface PaperlessDocument extends ObjectWithPermissions {
|
||||
correspondent$?: Observable<PaperlessCorrespondent>
|
||||
|
||||
correspondent?: number
|
||||
|
Reference in New Issue
Block a user