add command to set the allow registration status #902

Open
rmsthebest wants to merge 1 commit from toggle_allow_register into next
rmsthebest commented 2023-06-03 22:22:00 +00:00 (Migrated from gitlab.com)

I don't have a real computer right now to properly build and test this, and I'm not sure if just updating this global is enough to actually enable registration, maybe it is? Just wrote it on whim after reading https://gitlab.com/famedly/conduit/-/issues/353


  • [did not test] I ran cargo fmt and cargo test
  • I agree to release my code and all other changes of this MR under the Apache-2.0 license
I don't have a real computer right now to properly build and test this, and I'm not sure if just updating this global is enough to actually enable registration, maybe it is? Just wrote it on whim after reading https://gitlab.com/famedly/conduit/-/issues/353 ----------------------------------------------------------------------------- - [did not test] I ran `cargo fmt` and `cargo test` - [x] I agree to release my code and all other changes of this MR under the Apache-2.0 license
rmsthebest commented 2023-06-03 22:29:38 +00:00 (Migrated from gitlab.com)

added 1 commit

  • 3d25881c - add command to set the allow registration status

Compare with previous version

added 1 commit <ul><li>3d25881c - add command to set the allow registration status</li></ul> [Compare with previous version](/famedly/conduit/-/merge_requests/477/diffs?diff_id=698769958&start_sha=f42c65e2dfbe97a625309684d8b7a3bf0c260bde)
rmsthebest commented 2023-06-04 15:48:00 +00:00 (Migrated from gitlab.com)

added 1 commit

  • bfe826d9 - add command to set the allow registration status

Compare with previous version

added 1 commit <ul><li>bfe826d9 - add command to set the allow registration status</li></ul> [Compare with previous version](/famedly/conduit/-/merge_requests/477/diffs?diff_id=698883771&start_sha=3d25881c9ff0ab998f35b85137482f35baab5422)
shsorbom commented 2023-07-04 07:38:34 +00:00 (Migrated from gitlab.com)

Compilation fails:

error[E0594]: cannot assign to data in a `&` reference
   --> src/service/admin/mod.rs:652:17
    |
652 |                 services().globals.config.allow_registration = status;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot assign

error[E0277]: the trait bound `bool: FromArgMatches` is not satisfied
  --> src/service/admin/mod.rs:41:10
   |
41 | #[derive(Parser)]
   |          ^^^^^^ the trait `FromArgMatches` is not implemented for `bool`
   |
   = help: the following other types implement trait `FromArgMatches`:
             AdminCommand
             Box<T>
   = note: this error originates in the derive macro `Parser` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `bool: clap::Args` is not satisfied
   --> src/service/admin/mod.rs:158:23
    |
158 |     AllowRegistration(bool),
    |                       ^^^^ the trait `clap::Args` is not implemented for `bool`
    |
    = help: the trait `clap::Args` is implemented for `Box<T>`

Some errors have detailed explanations: E0277, E0594.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `conduit` (lib) due to 5 previous errors
Compilation fails: ~~~~ error[E0594]: cannot assign to data in a `&` reference --> src/service/admin/mod.rs:652:17 | 652 | services().globals.config.allow_registration = status; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot assign error[E0277]: the trait bound `bool: FromArgMatches` is not satisfied --> src/service/admin/mod.rs:41:10 | 41 | #[derive(Parser)] | ^^^^^^ the trait `FromArgMatches` is not implemented for `bool` | = help: the following other types implement trait `FromArgMatches`: AdminCommand Box<T> = note: this error originates in the derive macro `Parser` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `bool: clap::Args` is not satisfied --> src/service/admin/mod.rs:158:23 | 158 | AllowRegistration(bool), | ^^^^ the trait `clap::Args` is not implemented for `bool` | = help: the trait `clap::Args` is implemented for `Box<T>` Some errors have detailed explanations: E0277, E0594. For more information about an error, try `rustc --explain E0277`. error: could not compile `conduit` (lib) due to 5 previous errors ~~~~
This pull request is broken due to missing fork information.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin toggle_allow_register:toggle_allow_register
git checkout toggle_allow_register

Merge

Merge the changes and update on Forgejo.
git checkout next
git merge --no-ff toggle_allow_register
git checkout next
git merge --ff-only toggle_allow_register
git checkout toggle_allow_register
git rebase next
git checkout next
git merge --no-ff toggle_allow_register
git checkout next
git merge --squash toggle_allow_register
git checkout next
git merge --ff-only toggle_allow_register
git checkout next
git merge toggle_allow_register
git push origin next
Sign in to join this conversation.
No reviewers
No labels
Android
CS::needs customer feedback
CS::needs follow up
CS::needs on prem installation
CS::waiting
Chrome
Design:: Ready
Design:: in progress
Design::UX
E2EE
Edge
Firefox
GDPR
Iteration 13 IM
Linux
MacOS
Need::Discussion
Need::Steps to reproduce
Need::Upstream fix
Needs:: Planning
Needs::Dev-Team
Needs::More information
Needs::Priority
Needs::Product
Needs::Refinement
Needs::Severity
Priority::1-Critical
Priority::2-Max
Priority::3-Impending
Priority::4-High
Priority::5-Medium
Priority::6-Low
Priority::7-None
Progress::Backlog
Progress::Review
Progress::Started
Progress::Testing
Progress::Triage
Progress::Waiting
Reporter::Sentry
Safari
Target::Community
Target::Customer
Target::Internal
Target::PoC
Target::Security
Team:Customer-Success
Team:Design
Team:Infrastructure
Team:Instant-Messaging
Team:Product
Team:Workflows
Type::Bug
Type::Design
Type::Documentation
Type::Feature
Type::Improvement
Type::Support
Type::Tests
Windows
blocked
blocked-by-spec
cla-signed
conduit
contribution::advanced
contribution::easy
contribution::help needed
from::review
iOS
p::ti-tenant
performance
product::triage
proposal
refactor
release-blocker
s: dart_openapi_codegen
s::Famedly-Patient
s::Org-Directory
s::Passport-Generator
s::Requeuest
s:CRM
s:Famedly-App
s:Famedly-Web
s:Fhiroxide
s:Fhiroxide-cli
s:Fhiroxide-client
s:Fhirs
s:Hedwig
s:LISA
s:Matrix-Dart-SDK
s:Role-Manager
s:Synapse
s:User-Directory
s:WFS-Matrix
s:Workflow Engine
s:dtls
s:famedly-error
s:fcm-shared-isolate
s:matrix-api-lite
s:multiple-tab-detector
s:native-imaging
severity::1
severity::2
severity::3
severity::4
technical-debt
voip
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Matthias/conduit#902
No description provided.