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
fc0aff20
Unverified
Commit
fc0aff20
authored
2 years ago
by
Timo Kösters
Browse files
Options
Downloads
Patches
Plain Diff
fix: allow reactivation of users using reset-password admin command
parent
a4f18f99
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/service/admin/mod.rs
+3
-4
3 additions, 4 deletions
src/service/admin/mod.rs
with
3 additions
and
4 deletions
src/service/admin/mod.rs
+
3
−
4
View file @
fc0aff20
...
...
@@ -556,7 +556,6 @@ async fn process_admin_command(
// Check if the specified user is valid
if
!
services
()
.users
.exists
(
&
user_id
)
?
||
services
()
.users
.is_deactivated
(
&
user_id
)
?
||
user_id
==
UserId
::
parse_with_server_name
(
"conduit"
,
...
...
@@ -565,7 +564,7 @@ async fn process_admin_command(
.expect
(
"conduit user exists"
)
{
return
Ok
(
RoomMessageEventContent
::
text_plain
(
"The specified user does not exist
or is deactivated
!"
,
"The specified user does not exist!"
,
));
}
...
...
@@ -600,12 +599,12 @@ async fn process_admin_command(
};
if
user_id
.is_historical
()
{
return
Ok
(
RoomMessageEventContent
::
text_plain
(
format!
(
"
u
serid {user_id} is not allowed due to historical"
"
U
serid {user_id} is not allowed due to historical"
)));
}
if
services
()
.users
.exists
(
&
user_id
)
?
{
return
Ok
(
RoomMessageEventContent
::
text_plain
(
format!
(
"
u
serid {user_id} already exists"
"
U
serid {user_id} already exists"
)));
}
// Create user
...
...
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