summaryrefslogtreecommitdiffstats
path: root/server/src/api/community.rs
AgeCommit message (Collapse)Author
2020-07-14Security/fix permission bugs (#966)ryexandra
* secure the `EditPost` API endpoint * Check user is moderator in BanFromCommunity * secure the `EditComment` API endpoint * pass orig `read` prob when not explicitly updating it. * Block random users from adding mods. * use cleaner logic from `EditPost` * prevent editing a community by a mod from transfering ownership to them * secure `read` action in `EditPrivateMessage` * Add check in UserMention * only let the indended recipient mark as read * simplify booleans to satisfy clippy * requested changes + cargo +nightly fmt * fix to pass federation tests for deleting comments and posts Co-authored-by: chiminh <chiminh.tutanota.com> Co-authored-by: Hex Bear <buildadangtrain@protonmail.com>
2020-07-10Split code into cargo workspaces (#67)nutomic
More fixes - fixed docker builds - fixed mentions regex test - fixed DATABASE_URL stuff - change schema path in diesel.toml Address review comments - add jsonb column back into activity table - remove authors field from cargo.toml - adjust LEMMY_DATABASE_URL env var usage - rename all occurences of LEMMY_DATABASE_URL to DATABASE_URL Decouple utils and db Split code into cargo workspaces Co-authored-by: Felix Ableitner <me@nutomic.com> Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/67
2020-07-01Federation async (#848)Riley
* Asyncify more * I guess these changed * Clean PR a bit * Convert more away from failure error * config changes for testing federation * It was DNS So actix-web's client relies on TRust DNS Resolver to figure out where to send data, but TRust DNS Resolver seems to not play nice with docker, which expressed itself as not resolving the name to an IP address _the first time_ when making a request. The fix was literally to make the request again (which I limited to 3 times total, and not exceeding the request timeout in total) * Only retry for connecterror Since TRust DNS Resolver was causing ConnectError::Timeout, this change limits the retry to only this error, returning immediately for any other error * Use http sig norm 0.4.0-alpha for actix-web 3.0 support * Blocking function, retry http requests * cargo +nightly fmt * Only create one pictrs dir * Don't yarn build * cargo +nightly fmt
2020-06-23Merge branch 'master' into federation_merge_from_master_2Dessalines
2020-06-22Edit community name validation, translations #823Ernest
2020-06-20Community name validationErnest
2020-05-16Rework importsFelix
2020-05-04Renaming ignore to unfollow in followable trait.Dessalines
2020-05-03Adding undo follow community.Dessalines
2020-05-03Adding federated mod remove actions.Dessalines
2020-05-01Add undos for delete community, post, and comment.Dessalines
2020-05-01Adding federated community, comment, and post deletes.Dessalines
- Unit tests added too. - No undeletes working yet.
2020-04-29Address comments, implement delete for posts and commentsFelix
2020-04-28Implement deleting communitiesFelix
2020-04-27Adding activity table inserts.Dessalines
2020-04-26Making a trait function for follow and accept.Dessalines
2020-04-24Some fed fixes.Dessalines
2020-04-21Merge branch 'master' into federation_merge_from_master_1Dessalines
2020-04-19Change RateLimit to act as a middlewareasonix
2020-04-19Adding websocket notification system.Dessalines
- HTTP and APUB clients can now send live updating messages to websocket clients - Rate limiting now affects both HTTP and websockets - Rate limiting / Websocket logic is now moved into the API Perform functions. - TODO This broke getting current online users, but that will have to wait for the perform trait to be made async. - Fixes #446
2020-04-19Simplify signing codeFelix
2020-04-18Add http signature to outgoing apub requestsFelix
2020-04-14Front end federation names and links for users, posts, and communities.Dessalines
2020-04-14Implemented follow/acceptFelix
2020-04-07Store remote communities/posts in db, federate posts!Felix Ableitner
2020-04-03Move and rename some functionsFelix Ableitner
2020-04-03Merge branch 'federation_add_fed_columns' of ↵Felix Ableitner
https://yerbamate.dev/dessalines/lemmy into federation
2020-04-03Share list of communities over apub, some refactoringFelix Ableitner
2020-04-03Federation DB Changes.Dessalines
- Creating an activity table. - Adding some federation-related columns to the user_ and community tables. - Generating the actor_id and keys in code, updating the tables.
2020-03-18Rewrite federation settingsFelix Ableitner
2020-03-14Implemented basics for post federation, plus a bunch of other stuffFelix Ableitner
2020-03-14Move apub related code from websocket into api packageFelix Ableitner
2020-02-05Merge branch 'federation' into dev_1Dessalines
2020-02-02Returning specific slurs from slur filter on failure. Fixes #463Dessalines
2020-01-31Starting to work on user message scope.Dessalines
2020-01-18working!Felix
2020-01-14Merge branch 'master' into federationFelix
2020-01-12Trying to add r2d2 connection pooling to websockets.Dessalines
2020-01-02Merge branch 'master' into federationFelix Ableitner
2020-01-02Apply changes suggested by cargo clippy (fixes #395)Felix Ableitner
2019-12-30Implementing very basic federation including test setupFelix Ableitner
2019-12-11Introduce the "MaybeOptional" trait.Lyra
This trait is a generic type that allows us to get an Option from any type and from another option. It can be used to remove the ugly "do_something", "do_something_optional" that we previously had.
2019-12-09Switching to shorthands for rust params.Dessalines
2019-12-08Use builder pattern for viewsDessalines
- Fixes #360
2019-11-22Fixing issue with missing community.Dessalines
- Fixes #339
2019-09-07Running cargo fmt on server code.Dessalines
- Adding a .rustfmt.toml for the 2 space indent.
2019-08-29Allow admins to add mods and transfer communitiesDessalines
- Fixes #238
2019-08-23Adding Community and Site transferDessalines
- Fixes #139
2019-08-13Squashed commit of the following:Dessalines
commit ecd6c5a2f47cbbb2fc4bf482fadd78380303a904 Author: Dessalines <happydooby@gmail.com> Date: Tue Aug 13 19:49:38 2019 -0700 Adding some docs commit 3babd09affb1920da3d0a0ceb7e24c8aeeb9cf1a Author: Dessalines <happydooby@gmail.com> Date: Tue Aug 13 19:28:46 2019 -0700 Adding save user settings commit 6e8da9cc9e522d0da668bfa31944c3348cc79620 Merge: 3246d5d c148eef Author: Dessalines <happydooby@gmail.com> Date: Tue Aug 13 17:26:25 2019 -0700 Merge branch 'dev' into nsfw commit b3d4a5c4ce441bcc664704aba44cedb51d887599 Author: Dessalines <happydooby@gmail.com> Date: Sun Aug 11 20:55:09 2019 -0700 nsfw mostly done, except for settings page.
2019-08-10Adding support for community and user searching.Dessalines
- Fixes #130