Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
conduwuit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
🥺
conduwuit
Commits
d95c02f5
Commit
d95c02f5
authored
11 months ago
by
🥺
Committed by
🥺
11 months ago
Browse files
Options
Downloads
Patches
Plain Diff
add config option for logging guest regs in admin room
Signed-off-by:
strawberry
<
strawberry@puppygock.gay
>
parent
e57051ac
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
conduwuit-example.toml
+4
-0
4 additions, 0 deletions
conduwuit-example.toml
src/api/client_server/account.rs
+1
-1
1 addition, 1 deletion
src/api/client_server/account.rs
src/config/mod.rs
+6
-0
6 additions, 0 deletions
src/config/mod.rs
src/service/globals/mod.rs
+2
-0
2 additions, 0 deletions
src/service/globals/mod.rs
with
13 additions
and
1 deletion
conduwuit-example.toml
+
4
−
0
View file @
d95c02f5
...
...
@@ -159,6 +159,10 @@ ip_range_denylist = [
# For private homeservers, this is best at false.
allow_guest_registration
=
false
# Set to true to log guest registrations in the admin room.
# Defaults to false as it may be noisy or unnecessary.
log_guest_registrations
=
false
# Vector list of servers that conduwuit will refuse to download remote media from.
# No default.
# prevent_media_downloads_from = ["example.com", "example.local"]
...
...
This diff is collapsed.
Click to expand it.
src/api/client_server/account.rs
+
1
−
1
View file @
d95c02f5
...
...
@@ -290,7 +290,7 @@ pub async fn register_route(body: Ruma<register::v3::Request>) -> Result<registe
}
// log in conduit admin channel if a guest registered
if
!
body
.from_appservice
&&
is_guest
{
if
!
body
.from_appservice
&&
is_guest
&&
services
()
.globals
.log_guest_registrations
()
{
services
()
.admin
.send_message
(
RoomMessageEventContent
::
notice_plain
(
format!
(
...
...
This diff is collapsed.
Click to expand it.
src/config/mod.rs
+
6
−
0
View file @
d95c02f5
...
...
@@ -258,6 +258,8 @@ pub struct Config {
#[serde(default)]
pub
allow_guest_registration
:
bool
,
#[serde(default)]
pub
log_guest_registrations
:
bool
,
#[serde(default
=
"Vec::new"
)]
pub
prevent_media_downloads_from
:
Vec
<
OwnedServerName
>
,
...
...
@@ -509,6 +511,10 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
"Allow guest registration (inherently false if allow registration is false)"
,
&
self
.allow_guest_registration
.to_string
(),
),
(
"Log guest registrations in admin room"
,
&
self
.log_guest_registrations
.to_string
(),
),
(
"New user display name suffix"
,
&
self
.new_user_displayname_suffix
),
(
"Allow encryption"
,
&
self
.allow_encryption
.to_string
()),
(
"Allow federation"
,
&
self
.allow_federation
.to_string
()),
...
...
This diff is collapsed.
Click to expand it.
src/service/globals/mod.rs
+
2
−
0
View file @
d95c02f5
...
...
@@ -209,6 +209,8 @@ pub fn allow_registration(&self) -> bool { self.config.allow_registration }
pub
fn
allow_guest_registration
(
&
self
)
->
bool
{
self
.config.allow_guest_registration
}
pub
fn
log_guest_registrations
(
&
self
)
->
bool
{
self
.config.log_guest_registrations
}
pub
fn
allow_encryption
(
&
self
)
->
bool
{
self
.config.allow_encryption
}
pub
fn
allow_federation
(
&
self
)
->
bool
{
self
.config.allow_federation
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment