Plume/plume-models/src
Ana Gelez 309e1200d0 Make a distinction between moderators and admins (#619)
* Make a distinction between moderators and admins

And rework the user list in the moderation interface, to be able to run the same action on many users,
and to have a huge list of actions whithout loosing space.

* Make user's role an enum + make it impossible for a moderator to escalate privileges

With the help of diesel-derive-enum (maybe it could be used in other places too?)

Also, moderators are still able to grant or revoke moderation rights to other people, but maybe only admins should be able to do it?

* Cargo fmt

* copy/pasting is bad

* Remove diesel-derive-enum and use an integer instead

It was not compatible with both Postgres and SQlite, because for one it generated a schema
with the "User_role" type, but for the other it was "Text"…

* Reset translations

* Use an enum to avoid magic numbers + fix the tests

* Reset translations

* Fix down.sql
2019-09-13 12:28:36 +02:00
..
search don't index drafts (#656) 2019-08-27 18:40:59 +02:00
admin.rs Make a distinction between moderators and admins (#619) 2019-09-13 12:28:36 +02:00
api_tokens.rs Run 'cargo fmt' to format code (#489) 2019-03-20 17:56:17 +01:00
apps.rs Remove Canapi (#540) 2019-04-28 22:17:21 +01:00
blog_authors.rs Avoid panics (#392) 2018-12-29 09:36:07 +01:00
blogs.rs Theming (#624) 2019-08-21 00:42:04 +02:00
comment_seers.rs Run 'cargo fmt' to format code (#489) 2019-03-20 17:56:17 +01:00
comments.rs refactor code to use Shrinkwraprs and diesel-derive-newtype (#598) 2019-05-25 19:23:45 +01:00
config.rs Theming (#624) 2019-08-21 00:42:04 +02:00
db_conn.rs Run 'cargo fmt' to format code (#489) 2019-03-20 17:56:17 +01:00
follows.rs refactor code to use Shrinkwraprs and diesel-derive-newtype (#598) 2019-05-25 19:23:45 +01:00
headers.rs Add unit tests for main model parts (#310) 2018-11-24 12:44:17 +01:00
inbox.rs Federate user deletion (#551) 2019-04-28 18:01:41 +01:00
instance.rs Make a distinction between moderators and admins (#619) 2019-09-13 12:28:36 +02:00
lib.rs Make a distinction between moderators and admins (#619) 2019-09-13 12:28:36 +02:00
likes.rs refactor code to use Shrinkwraprs and diesel-derive-newtype (#598) 2019-05-25 19:23:45 +01:00
medias.rs order media so that latest added are top (#660) 2019-08-28 11:37:03 +02:00
mentions.rs Improve notification management (#561) 2019-05-04 17:15:41 +02:00
migrations.rs import migrations and don't require diesel_cli for admins (#555) 2019-04-29 16:30:20 +02:00
notifications.rs delete notification on user deletion (#658) 2019-09-13 11:29:52 +02:00
password_reset_requests.rs Store password reset requests in database (#610) 2019-06-04 19:55:17 +01:00
plume_rocket.rs Add some feedback when performing some actions (#552) 2019-04-30 11:04:25 +01:00
post_authors.rs Avoid panics (#392) 2018-12-29 09:36:07 +01:00
posts.rs refactor code to use Shrinkwraprs and diesel-derive-newtype (#598) 2019-05-25 19:23:45 +01:00
reshares.rs refactor code to use Shrinkwraprs and diesel-derive-newtype (#598) 2019-05-25 19:23:45 +01:00
safe_string.rs Hide cw pictures behind a summary/details (#483) 2019-04-06 19:20:33 +02:00
schema.rs Make a distinction between moderators and admins (#619) 2019-09-13 12:28:36 +02:00
tags.rs cache local instance (#572) 2019-05-10 21:59:34 +01:00
users.rs Make a distinction between moderators and admins (#619) 2019-09-13 12:28:36 +02:00