Commit graph

4 commits

Author SHA1 Message Date
Dessalines 01cc8654e2
Fixing config_file env to use defaults instead (since its required). (#970)
* Fixing config_file env to use defaults instead (since its required). Fixes #764

* Changing the read / write to the custom config file one

* Adding a config note.
2020-07-22 20:17:41 -04:00
ryexandra 29037b4995
Security/fix permission bugs (#966)
* 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-14 09:17:25 -04:00
Dessalines e5d3e3a9c3
Adding a configurable config location through an env var. (#960)
* Adding a configurable config location through an env var.

- Its `LEMMY_CONFIG_LOCATION`
- Fixes #764

* Using a static for CONFIG_FILE again.

* Make clippy happy
2020-07-13 11:33:48 -04:00
nutomic 80aef61aed Split code into cargo workspaces (#67)
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-10 18:15:41 +00:00
Renamed from server/src/settings.rs (Browse further)