mirror of
https://forgejo.ellis.link/continuwuation/continuwuity/
synced 2026-10-06 09:37:26 +00:00
fix: ensure that registration is enabled before giving tokens from !admin token issue
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
|
||||
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