Fix permission error on subscription settings update

This commit is contained in:
silverpill 2023-02-09 19:56:51 +00:00
parent 344025ae2f
commit cbc3f7b65a
2 changed files with 5 additions and 1 deletions

View file

@ -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

View file

@ -94,7 +94,7 @@ pub async fn register_subscription_option(
) -> Result<HttpResponse, HttpError> {
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);
};