mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-12-23 10:30:41 +00:00
Hide password sign-up routings when it's disabled
This commit is contained in:
parent
13f7734751
commit
7de37bc9b7
1 changed files with 14 additions and 3 deletions
|
@ -18,9 +18,19 @@ use crate::utils::requires_login;
|
|||
use plume_common::activity_pub::{broadcast, ActivityStream, ApRequest, Id};
|
||||
use plume_common::utils::md_to_html;
|
||||
use plume_models::{
|
||||
blogs::Blog, db_conn::DbConn, follows, headers::Headers, inbox::inbox as local_inbox,
|
||||
instance::Instance, medias::Media, posts::Post, reshares::Reshare, safe_string::SafeString,
|
||||
signups::Strategy as SignupStrategy, users::*, Error, PlumeRocket, CONFIG,
|
||||
blogs::Blog,
|
||||
db_conn::DbConn,
|
||||
follows,
|
||||
headers::Headers,
|
||||
inbox::inbox as local_inbox,
|
||||
instance::Instance,
|
||||
medias::Media,
|
||||
posts::Post,
|
||||
reshares::Reshare,
|
||||
safe_string::SafeString,
|
||||
signups::{self, Strategy as SignupStrategy},
|
||||
users::*,
|
||||
Error, PlumeRocket, CONFIG,
|
||||
};
|
||||
|
||||
#[get("/me")]
|
||||
|
@ -466,6 +476,7 @@ pub fn create(
|
|||
form: LenientForm<NewUserForm>,
|
||||
conn: DbConn,
|
||||
rockets: PlumeRocket,
|
||||
_enabled: signups::Password,
|
||||
) -> Result<Flash<Redirect>, Ructe> {
|
||||
if !Instance::get_local()
|
||||
.map(|i| i.open_registrations)
|
||||
|
|
Loading…
Reference in a new issue