mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-12 19:56:48 +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<'_> {
|
||||
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 = {
|
||||
if expires.immortal {
|
||||
None
|
||||
|
||||
Reference in new issue
Block a user