mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-02-02 05:53:15 -05: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:
@@ -23,3 +23,8 @@ class AdminAboutInfo(AppInfo):
|
||||
db_type: str
|
||||
db_url: Path
|
||||
default_group: str
|
||||
|
||||
|
||||
class CheckAppConfig(CamelModel):
|
||||
email_ready: bool = False
|
||||
base_url_set: bool = False
|
||||
|
||||
8
mealie/schema/group/group_permissions.py
Normal file
8
mealie/schema/group/group_permissions.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from fastapi_camelcase import CamelModel
|
||||
|
||||
|
||||
class SetPermissions(CamelModel):
|
||||
user_id: int
|
||||
can_manage: bool = False
|
||||
can_invite: bool = False
|
||||
can_organize: bool = False
|
||||
@@ -18,3 +18,13 @@ class ReadInviteToken(CamelModel):
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
|
||||
|
||||
class EmailInvitation(CamelModel):
|
||||
email: str
|
||||
token: str
|
||||
|
||||
|
||||
class EmailInitationResponse(CamelModel):
|
||||
success: bool
|
||||
error: str = None
|
||||
|
||||
@@ -55,6 +55,10 @@ class UserBase(CamelModel):
|
||||
advanced: bool = False
|
||||
favorite_recipes: Optional[list[str]] = []
|
||||
|
||||
can_invite: bool = False
|
||||
can_manage: bool = False
|
||||
can_organize: bool = False
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user