diff --git a/CHANGELOG.md b/CHANGELOG.md index b8bd26a..93dbde8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Fixed + +- Fixed permission error on subscription settings update. + ## [1.13.0] - 2023-02-06 ### Added diff --git a/src/mastodon_api/subscriptions/views.rs b/src/mastodon_api/subscriptions/views.rs index 2372d3b..72ed833 100644 --- a/src/mastodon_api/subscriptions/views.rs +++ b/src/mastodon_api/subscriptions/views.rs @@ -94,7 +94,7 @@ pub async fn register_subscription_option( ) -> Result { let db_client = &**get_database_client(&db_pool).await?; let mut current_user = get_current_user(db_client, auth.token()).await?; - if current_user.role.has_permission(Permission::ManageSubscriptionOptions) { + if !current_user.role.has_permission(Permission::ManageSubscriptionOptions) { return Err(HttpError::PermissionError); };