Fix permission error on subscription settings update
This commit is contained in:
parent
344025ae2f
commit
cbc3f7b65a
2 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue