mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-16 05:36:50 +00:00
fix: ensure that registration is enabled before giving tokens from !admin token issue
This commit is contained in:
1 parent
56c2d8d901
commit
ea16e78092
1 file changed
+3
@@ -4,6 +4,9 @@ use service::registration_tokens::TokenExpires;
|
|||||||
|
|
||||||
impl crate::Context<'_> {
|
impl crate::Context<'_> {
|
||||||
pub(super) async fn issue_registration_token(&self, expires: super::TokenExpires) -> Result {
|
pub(super) async fn issue_registration_token(&self, expires: super::TokenExpires) -> Result {
|
||||||
|
if !self.services.config.allow_registration {
|
||||||
|
return Err!("Registration has been disabled on this homeserver.");
|
||||||
|
}
|
||||||
let expires = {
|
let expires = {
|
||||||
if expires.immortal {
|
if expires.immortal {
|
||||||
None
|
None
|
||||||
|
|||||||
Reference in new issue
Block a user