diff --git a/docs/docs/getting-started/site-settings.md b/docs/docs/getting-started/site-settings.md index 51fe5a688..d3d43ae79 100644 --- a/docs/docs/getting-started/site-settings.md +++ b/docs/docs/getting-started/site-settings.md @@ -1,6 +1,6 @@ # Site Settings Panel !!! danger - As this is still a **BETA** It is recommended that you backup your data often and store in more than one place. Ad-hear to backup best practices with the [3-2-1 Backup Rule](https://en.wikipedia.org/wiki/Backup) + As this is still a **BETA** It is recommended that you backup your data often and store in more than one place. Ad-hear to backup best practices with the [3-2-1 Backup Rule](https://en.wikipedia.org/wiki/Backup). Prior to upgrading you **should** perform a backup to limit any data loss. ## General Settings In your site settings page you can select several options to change the layout of your homepage. You can choose to display the recent recipes, how many cards to show for each section, and which category sections to display. You can additionally select which language to use by default. Note the currently homepage settings are saved in your browser. In the future a database entry will be made for site settings so the homepage is consistent across users. @@ -12,7 +12,7 @@ Color themes can be created and set from the UI in the settings page. You can se ![](../gifs/theme-demo-v2.gif) -!!! note +!!! tip Theme data is stored in localstorage in the browser. Calling "Save colors and apply theme will refresh the local storage with the selected theme as well save the theme to the database. diff --git a/docs/docs/getting-started/users.md b/docs/docs/getting-started/users.md new file mode 100644 index 000000000..cea439abd --- /dev/null +++ b/docs/docs/getting-started/users.md @@ -0,0 +1,32 @@ +# User Managemenet + +## Overview +The basic relationship and ownership of recipes and meal plans is based on a user and group model where users are owners of recipes and groups are owners of meal plans. By default all users will be added to the default group. If a recipe is added through a migration or through a backup where no user exists ownership will be set to the default Admin, the original user provided by Mealie. To fully understand how to structure your users and groups, you'll need to know how each role is used in the website. + +!!! info ":fontawesome-solid-user-cog: Admins" + Mealie admins are super users that have access to all user data (excluding passwords). All admins can perform administrative tasks like adding users, resetting user passwords, backing up the database, migrating data, and managing site settings. Administrators can also access restricted recipes that are marked hidden or with editing disabled by the owner. + +!!! info ":fontawesome-solid-users: User Groups" + User groups, or "family" groups are a collection of users that are associated together. Users belonging to groups will have access to their associated meal plans and associated pages. This is currently the only feature of groups. + +!!! info ":fontawesome-solid-user: User" + A single user created by an Admin that has basic privileges to edit their profile, create and edit recipes they own. Edit recipes that are not hidden and are marked editable. + +## Startup +On the first startup you'll need to login to Mealie using the default username and password `changeme@email.com` and `MyPassword` or the default set through the env variable. On first login you'll be required to reset your password. After resetting your password you should also change your email address as appropriate. This will be used for logins on all future requests. + +!!! tip + Your default password environmental variable will be the default password for all new users that are created. This is stored in plain text and should not be used **any where** else. + + +## Creating and Editing Users +// TODO + +## Creating Groups +// TODO + +## Password Reset +// TODO + +## Examples Use Cases +// TODO \ No newline at end of file diff --git a/docs/docs/img/app_diagram.drawio.svg b/docs/docs/img/app_diagram.drawio.svg index d8fa0877a..30e458ba5 100644 --- a/docs/docs/img/app_diagram.drawio.svg +++ b/docs/docs/img/app_diagram.drawio.svg @@ -1,135 +1,230 @@ - + - - - - - + + + -
-
+
+
- Models +

+ User Groups +

+

+ User groups, or "family" groups are a collection of users that are associated together. Users belonging to groups will have access to their associated mealplans and associated pages. This is currently the only feature of groups. +

- - Models + + User Groups... - + + + -
-
+
+
- Database +

+ Admins +

+

+ Mealie admins are super users that have access to all user data (excluding passwords). Perform administrative tasks like adding users, resetting user passwords, backing up the database, migrating data, and managing site settings. Administrators can also access restricted recipes that are marked hidden or uneditable by the user. +

- - Database + + Admins... - - - - - - - - + + + -
-
+
+
- Python Dictionary +

+ Users +

+

+ A single user created by an Admin that has basic privlages to edit their profile, create and edit recipes they own. Edit recipes that are not hidden and are marked editable. +

- - Python Dictio... + + Users... - - - - - + + + -
-
+
+
- Pydantic Model +

+ Database Relationships +

+

+ The basic relationship and ownership is diagramed below. In short users are owners of recipes and groups are the owners of meal-plans. By default all users will be added to the "default" group. If a recipe is added through a migration or through a backup where no user exists ownership will be set to the default Admin. +

- - Pydantic Mo... + + Database Relationships... - - - - - - + + + + + + Recipe + + + + + - owners: list[Users] + + + - editable: boolean + + + - hidden: boolean + + + + + + + + User + + + + + - admin: boolean + + + - group: list[Group] + + + - recipes: list[Recipe] + + + + + + + + MealPlan + + + + + - group: Group + + + + + + + + Group + + + + + - users: list[Users] + + + - mealplans list[MealPlan] + + -
+
-
- Services +
+ User.group is backfilled by a Groups object
- - Services + + User.group is bac... - + + + + + + + + + -
+
-
- API Endpoints +
+ User.recipes is backfilled by Recipe objects
- - API Endpoin... + + User.recipes is b... + + + + + + +
+
+
+ Group.mealplan is backfilled by MealPlan objects +
+
+
+
+ + Group.mealplan is...
- - - - + Viewer does not support full SVG 1.1 diff --git a/docs/docs/img/app_diagram.png b/docs/docs/img/app_diagram.png new file mode 100644 index 000000000..7f3356257 Binary files /dev/null and b/docs/docs/img/app_diagram.png differ diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 41b57ec76..bfbca9612 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -29,6 +29,7 @@ nav: - Getting Started: - Installation: "getting-started/install.md" - Working With Recipes: "getting-started/recipes.md" + - User Management: "getting-started/users.md" - Planning Meals: "getting-started/meal-planner.md" - Site Settings: "getting-started/site-settings.md" - Backups and Exports: "getting-started/backups-and-exports.md"