Commit Graph

1323 Commits

Author SHA1 Message Date
bitfl0wer 00c70501c4
Rename to_public_user into into_public_user 2024-01-23 23:06:14 +01:00
bitfl0wer 97ab757633
Add unit tests for guild.rs entities 2024-01-23 21:13:15 +01:00
bitfl0wer 7434690027
Remove Eq fromn Guild as it is not Eq 2024-01-23 21:05:01 +01:00
bitfl0wer 577a399a7b
Create tests from to_str and from_str for GuildFeatures 2024-01-23 20:50:19 +01:00
bitfl0wer 11df180446
APPEND: Remove unused imports 2024-01-23 19:08:35 +01:00
bitfl0wer 0923de59a4
Replace usage of Arc<RwLock<...>> in public APIs with Shared<...> 2024-01-23 19:07:23 +01:00
bitfl0wer 8846159ffd
Remove impl Eq from types that didn't qualify for Eq 2024-01-23 18:43:06 +01:00
bitfl0wer 013687c810
write unit tests for config and entities 2024-01-22 20:57:29 +01:00
bitfl0wer c6e7724650
rustfmt 2024-01-22 20:57:17 +01:00
bitfl0wer 74fc954d1a
Fix broken behaviour for ConfigEntity 2024-01-22 20:57:08 +01:00
Flori fe8106d2a1
"Self updating structs" API improvements (#467)
This PR slightly improves the ergonomics of working with self-updating
structs, by making the changes as documented in #466.
2024-01-22 15:19:24 +01:00
bitfl0wer 21699e5899
Loosen bounds on IntoShared<T> 2024-01-22 15:00:46 +01:00
bitfl0wer 5372d2c475
Make IntoShared trait with blanket implementation 2024-01-22 14:56:23 +01:00
bitfl0wer 29f3ee802a
Fix errors by moving into_shared out of Composite 2024-01-22 14:50:33 +01:00
bitfl0wer 6637f14b18
Replace Arc, Rwlock with Shared 2024-01-21 20:24:17 +01:00
bitfl0wer a571a9e137
Write documentation for observe 2024-01-21 20:13:00 +01:00
bitfl0wer 57214fd2fe
Add documentation for into_shared 2024-01-21 17:15:11 +01:00
bitfl0wer ca58767372
Rename to_shared to into_shared 2024-01-21 17:10:24 +01:00
bitfl0wer 2a7cae30b8
Define public method `to_shared` for dyn Composite 2024-01-21 17:07:54 +01:00
bitfl0wer 0660e25bdb
rustfmt 2024-01-21 17:07:30 +01:00
bitfl0wer 36ac6c1e5e
Replace use of Arc<RwLock<T>> with Shared<T> 2024-01-21 17:07:19 +01:00
bitfl0wer 315fe8e33b
Define type alias `Shared` 2024-01-21 17:06:43 +01:00
kozabrada123 8e25f401a5
Minor instance updates (#465)
make Instance::from_url_bundle pub, update Instance docs
2024-01-20 13:15:13 +01:00
Flori 85e494dd4a
merge main into dev (#464) 2024-01-19 21:55:29 +01:00
Flori d3853700c0
Update README.md 2024-01-19 21:55:05 +01:00
bitfl0wer 59b6907481
Merge branch 'main' of https://github.com/polyphony-chat/chorus 2024-01-19 21:50:44 +01:00
bitfl0wer f7d31fe57b
bump version to 0.14.0 2024-01-19 21:50:42 +01:00
Flori dcc626ef10
Version 0.14.0 (#463)
## Fixes

- Fix gateway heartbeat on WASM: #460

## Changes

- Update `GuildDefaults` to use new enums
- Make new enums derive `sqlx::Type`
- Feature lock UpdateMessage implementations

## Package changes

- Bump package version, especially reqwest from 0.11.22->0.11.23 -
removes need for custom git branch in Cargo.toml
2024-01-19 21:50:26 +01:00
Flori 011b214ea1
Fix gateway heartbeat on WASM (#460)
It turns out `std::time::Instant::now()` panics WASM (see #459) and
breaks the heartbeat handler.

This pr attempts to fix that by replacing `std::time::Instant` with
`wasmtimer::std::Instant` and `safina_timer::sleep_until` with
`wasmtimer::tokio::sleep_until`.
2024-01-19 17:24:48 +01:00
kozabrada123 8a2bc8287e Revert "Mess w/ the tests to see if it really works"
This reverts commit 8243f103f9.
2024-01-19 16:05:34 +01:00
kozabrada123 8243f103f9 Mess w/ the tests to see if it really works 2024-01-19 15:53:24 +01:00
kozabrada123 34cc344c8d feat: switch safina_timer for tokio, fix sleep duration overflow in examples 2024-01-19 15:48:59 +01:00
kozabrada123 72936d4f21 right 2024-01-19 15:31:40 +01:00
kozabrada123 921a3ef9c0 fix: gateway simple example 2024-01-19 15:21:53 +01:00
kozabrada123 c3017df1c2 fix tests 2024-01-19 15:14:50 +01:00
kozabrada123 e2b69487aa fix error 2024-01-19 15:06:27 +01:00
kozabrada123 d37415fc13 feat: fix heartbeat time on WASM 2024-01-19 14:55:23 +01:00
Flori 82a3f98db7
bump package versions (#458) 2024-01-11 19:51:27 +01:00
bitfl0wer 7fdb4bae49
bump package versions 2024-01-11 19:36:36 +01:00
bitfl0wer de42299fd0
bump reqwest to 0.11.23 2024-01-11 19:30:40 +01:00
bitfl0wer b87af21c31
Revert last commit 2023-12-17 22:16:53 +01:00
bitfl0wer e0492bb2f6
Add MANAGE_ENCRYPTION permission 2023-12-17 20:47:52 +01:00
Flori abd25b2040
merge backend branch into dev (#454) 2023-12-15 00:22:46 +01:00
Flori 7a517b3663
Well known required (#456)
Title: Add User Authentication Feature

Description:

This pull request introduces user authentication functionality to our
web application. The main goal of this feature is to ensure that each
action performed on the platform is tied to a valid, logged-in user,
thus providing accountability and maintaining data security.

Changes:

New models: Added the User model to represent users in our system. This
model includes fields: username, password_hash, email etc.

User seriliazer and views: Implemented serializers and API views for
user registration, login, and logout.

Authentication Middlewares: Added middlewares to check for a valid
session or token before allowing access to certain views.

Tests: Included comprehensive test coverage for the new feature. Tests
were implemented to verify user registration, login, and logout
functionality, as well as checking authentication enforcement on
applicable views.

    Documentation: Updated API documentation related to User endpoints.

This feature is expected to improve the overall security of our
application by properly managing user sessions and actions.

Note: You will see references to some helper tools like make_password
and check_password methods, these are security measures to ensure we are
not storing plain text passwords in the database.

This PR follows our Python coding standards and is fully linted and
tested.

Requesting review and feedback. If all points are clear and no issues
are detected during the review, we would appreciate it if this PR could
be merged at the earliest convenience.

Related Issue: #123
2023-12-15 00:22:36 +01:00
bitfl0wer fd3aad03e3
Refactor instance creation 2023-12-15 00:10:33 +01:00
Flori b319f3f720
Update docs (#453) 2023-12-10 18:51:32 +01:00
bitfl0wer ce6f09b657
Update documentation and examples 2023-12-10 18:40:03 +01:00
bitfl0wer 6b0fd238c8
Update cargo lock 2023-12-10 18:37:38 +01:00
bitfl0wer 1cbeba45c4
Merge branch 'dev' 2023-12-03 22:37:28 +01:00
bitfl0wer bbdcd35b60
Bump version 2023-12-03 22:35:45 +01:00