Move user management routes to their seperate feature

This commit is contained in:
Emi Tatsuo 2020-11-23 10:01:53 -05:00
parent 28a4d64c5f
commit 2400ef8796
Signed by: Emi
GPG Key ID: 68FAB2E2E6DFC98B
6 changed files with 24 additions and 1 deletions

View File

@ -11,6 +11,7 @@ documentation = "https://docs.rs/northstar"
[features]
user_management = ["sled", "bincode", "serde/derive", "crc32fast"]
user_management_advanced = ["rust-argon2", "ring", "user_management"]
user_management_routes = ["user_management"]
default = ["serve_dir"]
serve_dir = ["mime_guess", "tokio/fs"]
@ -35,7 +36,7 @@ ring = { version = "0.16.15", optional = true }
[[example]]
name = "user_management"
required-features = ["user_management"]
required-features = ["user_management_routes"]
[dev-dependencies]
env_logger = "0.8.1"

View File

@ -20,7 +20,9 @@
//! Use of this module requires the `user_management` feature to be enabled
pub mod user;
mod manager;
#[cfg(feature = "user_management_routes")]
mod routes;
#[cfg(feature = "user_management_routes")]
pub use routes::UserManagementRoutes;
pub use manager::UserManager;
pub use user::User;

View File

@ -0,0 +1,5 @@
# Certificate Found!
Your certificate was found, all that's left to do is pick a username!
=> /account/register Sign Up

View File

@ -0,0 +1,5 @@
# Welcome!
To continue, please create an account.
=> /account/register Set up my account

View File

@ -0,0 +1,5 @@
# Username Exists
Unfortunately, it looks like the username {username} is already taken.
=> /account/register Choose a different username

View File

@ -0,0 +1,5 @@
# Account Created!
Welcome {username}! Your account has been created.
=> {redirect} Back to app