Implement OIDC authentication
This commit is contained in:
committed by
Aditya Chandel
parent
548e09ae2c
commit
817b572c08
@@ -25,7 +25,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="text-lg py-1">Epub:</p>
|
||||
<p class="text-lg py-1">Epub:</p>
|
||||
<div class="flex gap-4 justify-start">
|
||||
<div *ngFor="let item of individualOrGlobal" class="flex items-center gap-2">
|
||||
<p-radiobutton
|
||||
@@ -120,9 +120,9 @@
|
||||
|
||||
<p class="text-lg py-1">Font Size:</p>
|
||||
<div class="flex gap-4 justify-start items-center">
|
||||
<p-button icon="pi pi-minus" rounded="true" (click)="decreaseFontSize()"></p-button>
|
||||
<p-button icon="pi pi-minus" rounded="true" size="small" (click)="decreaseFontSize()"></p-button>
|
||||
<p>{{ fontSize }}%</p>
|
||||
<p-button icon="pi pi-plus" rounded="true" (click)="increaseFontSize()"></p-button>
|
||||
<p-button icon="pi pi-plus" rounded="true" size="small" (click)="increaseFontSize()"></p-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
<div class="rounded-xl overflow-hidden">
|
||||
<p-tabs [(value)]="activeTab">
|
||||
<p-tablist>
|
||||
<p-tab [value]="SettingsTab.BookReader">Book Reader</p-tab>
|
||||
<p-tab [value]="SettingsTab.BookReader">Reader Settings</p-tab>
|
||||
<ng-container *ngIf="userData.permissions.admin">
|
||||
<p-tab [value]="SettingsTab.UserManagement">User Management</p-tab>
|
||||
<p-tab [value]="SettingsTab.Email">Email Setting</p-tab>
|
||||
<p-tab [value]="SettingsTab.GlobalSettings">Other Settings</p-tab>
|
||||
<p-tab [value]="SettingsTab.GlobalSettings">Admin Settings</p-tab>
|
||||
<p-tab [value]="SettingsTab.AuthenticationSettings">Authentication Settings</p-tab>
|
||||
</ng-container>
|
||||
</p-tablist>
|
||||
|
||||
@@ -24,6 +25,9 @@
|
||||
<p-tabpanel [value]="SettingsTab.GlobalSettings">
|
||||
<app-global-preferences></app-global-preferences>
|
||||
</p-tabpanel>
|
||||
<p-tabpanel [value]="SettingsTab.AuthenticationSettings">
|
||||
<app-authentication-settings></app-authentication-settings>
|
||||
</p-tabpanel>
|
||||
</ng-container>
|
||||
</p-tabpanels>
|
||||
</p-tabs>
|
||||
|
||||
@@ -8,12 +8,14 @@ import {GlobalPreferencesComponent} from './global-preferences/global-preference
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Subscription} from 'rxjs';
|
||||
import {UserManagementComponent} from './user-management/user-management.component';
|
||||
import {AuthenticationSettingsComponent} from '../oauth2-management/authentication-settings.component';
|
||||
|
||||
export enum SettingsTab {
|
||||
BookReader = 'book-reader',
|
||||
UserManagement = 'user-management',
|
||||
Email = 'email',
|
||||
GlobalSettings = 'global-settings'
|
||||
GlobalSettings = 'global-settings',
|
||||
AuthenticationSettings = 'auth-settings'
|
||||
}
|
||||
|
||||
@Component({
|
||||
@@ -29,7 +31,8 @@ export enum SettingsTab {
|
||||
AsyncPipe,
|
||||
EmailComponent,
|
||||
GlobalPreferencesComponent,
|
||||
UserManagementComponent
|
||||
UserManagementComponent,
|
||||
AuthenticationSettingsComponent
|
||||
],
|
||||
templateUrl: './settings.component.html',
|
||||
styleUrl: './settings.component.scss'
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<p-table [value]="users" class="mt-4">
|
||||
<ng-template pTemplate="header">
|
||||
<tr>
|
||||
<th>Provisioning</th>
|
||||
<th>Username</th>
|
||||
<th>Full Name</th>
|
||||
<th>Email</th>
|
||||
@@ -26,6 +27,9 @@
|
||||
|
||||
<ng-template pTemplate="body" let-user>
|
||||
<tr>
|
||||
<td>
|
||||
{{ (user.provisioningMethod || 'LOCAL') | lowercase | titlecase }}
|
||||
</td>
|
||||
<td>{{ user.username }}</td>
|
||||
<td>
|
||||
<input *ngIf="user.isEditing" type="text" [(ngModel)]="user.name" class="p-inputtext w-full"/>
|
||||
|
||||
@@ -4,7 +4,7 @@ import {Button} from 'primeng/button';
|
||||
import {DialogService, DynamicDialogRef} from 'primeng/dynamicdialog';
|
||||
import {CreateUserDialogComponent} from './create-user-dialog/create-user-dialog.component';
|
||||
import {TableModule} from 'primeng/table';
|
||||
import {NgIf, NgStyle} from '@angular/common';
|
||||
import {LowerCasePipe, NgIf, NgStyle, TitleCasePipe} from '@angular/common';
|
||||
import {User, UserService} from './user.service';
|
||||
import {MessageService} from 'primeng/api';
|
||||
import {Checkbox} from 'primeng/checkbox';
|
||||
@@ -25,7 +25,9 @@ import {Password} from 'primeng/password';
|
||||
NgStyle,
|
||||
MultiSelect,
|
||||
Dialog,
|
||||
Password
|
||||
Password,
|
||||
LowerCasePipe,
|
||||
TitleCasePipe
|
||||
],
|
||||
templateUrl: './user-management.component.html',
|
||||
styleUrls: ['./user-management.component.scss'],
|
||||
|
||||
@@ -21,6 +21,7 @@ export interface User {
|
||||
canManipulateLibrary: boolean;
|
||||
};
|
||||
bookPreferences: UserBookPreferences;
|
||||
provisioningMethod?: 'LOCAL' | 'OIDC' | 'REMOTE';
|
||||
}
|
||||
|
||||
export interface UserBookPreferences {
|
||||
|
||||
Reference in New Issue
Block a user