1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-23 15:19:41 +02:00

feat(frontend): add group permissions (#721)

* style(frontend): 💄 add darktheme custom

* add dummy users in dev mode

* feat(frontend):  add group permissions editor UI

* feat(backend):  add group permissions setters

* test(backend):  tests for basic permission get/set (WIP)

Needs more testing

* remove old test

* chore(backend): copy template.env on setup

* feat(frontend):  enable send invitation via email

* feat(backend):  enable send invitation via email

* feat:  add app config checker for site-settings

* refactor(frontend): ♻️ consolidate bool checks

Co-authored-by: Hayden <hay-kot@pm.me>
This commit is contained in:
Hayden 2021-10-04 20:16:37 -08:00 committed by GitHub
parent b7b8aa9a08
commit 5d43fac7c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 652 additions and 106 deletions

View file

@ -2,6 +2,8 @@ import { BaseAPI } from "./_base";
const routes = {
base: "/api/admin/email",
invitation: "/api/groups/invitations/email",
};
export interface CheckEmailResponse {
@ -17,6 +19,16 @@ export interface TestEmailPayload {
email: string;
}
export interface InvitationEmail {
email: string;
token: string;
}
export interface InvitationEmailResponse {
success: boolean;
error: string;
}
export class EmailAPI extends BaseAPI {
check() {
return this.requests.get<CheckEmailResponse>(routes.base);
@ -25,4 +37,8 @@ export class EmailAPI extends BaseAPI {
test(payload: TestEmailPayload) {
return this.requests.post<TestEmailResponse>(routes.base, payload);
}
sendInvitation(payload: InvitationEmail) {
return this.requests.post<InvitationEmailResponse>(routes.invitation, payload);
}
}