mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00

Revert "exclude current user from permissions retrieval users" This reverts commit 87efd0ccc8d4eb9d8acb614d22a5c95ffdb895ae. Update permissions-user.component.ts
34 lines
1.0 KiB
TypeScript
34 lines
1.0 KiB
TypeScript
import { Component, forwardRef, Input, OnInit } from '@angular/core'
|
|
import { NG_VALUE_ACCESSOR } from '@angular/forms'
|
|
import { first } from 'rxjs/operators'
|
|
import { PaperlessUser } from 'src/app/data/paperless-user'
|
|
import { UserService } from 'src/app/services/rest/user.service'
|
|
import { SettingsService } from 'src/app/services/settings.service'
|
|
import { AbstractInputComponent } from '../../abstract-input'
|
|
|
|
@Component({
|
|
providers: [
|
|
{
|
|
provide: NG_VALUE_ACCESSOR,
|
|
useExisting: forwardRef(() => PermissionsUserComponent),
|
|
multi: true,
|
|
},
|
|
],
|
|
selector: 'app-permissions-user',
|
|
templateUrl: './permissions-user.component.html',
|
|
styleUrls: ['./permissions-user.component.scss'],
|
|
})
|
|
export class PermissionsUserComponent extends AbstractInputComponent<
|
|
PaperlessUser[]
|
|
> {
|
|
users: PaperlessUser[]
|
|
|
|
constructor(userService: UserService, settings: SettingsService) {
|
|
super()
|
|
userService
|
|
.listAll()
|
|
.pipe(first())
|
|
.subscribe((result) => (this.users = result.results))
|
|
}
|
|
}
|