
* Added ReadingList age rating from all series and started on some unit tests for the new flows. * Wrote more unit tests for Reading Lists * Added ability to restrict user accounts to a given age rating via admin edit user modal and invite user. This commit contains all basic code, but no query modifications. * When updating a reading list's title via UI, explicitly check if there is an existing RL with the same title. * Refactored Reading List calculation to work properly in the flows it's invoked from. * Cleaned up an unused method * Promoted Collections no longer show tags where a Series exists within them that is above the user's age rating. * Collection search now respects age restrictions * Series Detail page now checks if the user has explicit access (as a user might bypass with direct url access) * Hooked up age restriction for dashboard activity streams. * Refactored some methods from Series Controller and Library Controller to a new Search Controller to keep things organized * Updated Search to respect age restrictions * Refactored all the Age Restriction queries to extensions * Related Series no longer show up if they are out of the age restriction * Fixed a bad mapping for the update age restriction api * Fixed a UI state change after updating age restriction * Fixed unit test * Added a migration for reading lists * Code cleanup
61 lines
No EOL
3.5 KiB
HTML
61 lines
No EOL
3.5 KiB
HTML
<div class="modal-container">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title" id="modal-basic-title">Invite User</h4>
|
|
<button type="button" class="btn-close" aria-label="Close" (click)="close()"></button>
|
|
</div>
|
|
<div class="modal-body scrollable-modal">
|
|
<p>
|
|
Invite a user to your server. Enter their email in and we will send them an email to create an account. If you do not want to use our email service, you can <a href="https://wiki.kavitareader.com/en/guides/misc/email" rel="noopener noreferrer" target="_blank" rel="noopener noreferrer">host your own</a>
|
|
email service or use a fake email (Forgot User will not work). A link will be presented regardless and can be used to setup the email account manually.
|
|
</p>
|
|
|
|
<form [formGroup]="inviteForm" *ngIf="emailLink === ''">
|
|
<div class="row g-0">
|
|
<div class="mb-3" style="width:100%">
|
|
<label for="email" class="form-label">Email</label>
|
|
<input class="form-control" type="email" id="email" formControlName="email" required [class.is-invalid]="inviteForm.get('email')?.invalid && inviteForm.get('email')?.touched">
|
|
<div id="inviteForm-validations" class="invalid-feedback" *ngIf="inviteForm.dirty || inviteForm.touched">
|
|
<div *ngIf="email?.errors?.required">
|
|
This field is required
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row g-0">
|
|
<div class="col-md-6">
|
|
<app-role-selector (selected)="updateRoleSelection($event)" [allowAdmin]="true"></app-role-selector>
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
<app-library-selector (selected)="updateLibrarySelection($event)"></app-library-selector>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row g-0">
|
|
<div class="col-md-12">
|
|
<app-restriction-selector (selected)="updateRestrictionSelection($event)" [isAdmin]="hasAdminRoleSelected"></app-restriction-selector>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<ng-container *ngIf="emailLink !== ''">
|
|
<h4>User invited</h4>
|
|
<p>You can use the following link below to setup the account for your user or use the copy button. You may need to log out before using the link to register a new user.
|
|
If your server is externally accessible, an email will have been sent to the user and the links can be used by them to finish setting up their account.
|
|
</p>
|
|
<a class="email-link" href="{{emailLink}}" target="_blank" rel="noopener noreferrer">Setup user's account</a>
|
|
<app-api-key title="Invite Url" tooltipText="Copy this and paste in a new tab. You may need to log out." [showRefresh]="false" [transform]="makeLink"></app-api-key>
|
|
</ng-container>
|
|
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" (click)="close()">
|
|
Cancel
|
|
</button>
|
|
<button type="button" class="btn btn-primary" (click)="invite()" [disabled]="isSending || !inviteForm.valid || emailLink !== ''">
|
|
<span *ngIf="isSending" class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
|
|
<span>{{isSending ? 'Inviting...' : 'Invite'}}</span>
|
|
</button>
|
|
</div>
|
|
</div> |