Skip to content

Commit

Permalink
Fix api permissions endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
apozohue10 committed Dec 22, 2022
1 parent 3bc0fda commit abb079b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions controllers/api/permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,11 @@ function check_update_body_request(body) {
if (typeof permission.use_authorization_service_header !== 'boolean') {
reject(bad_request('use_authorization_service_header attribute must be a boolean'));
}
} else if (!permission.authorization_service_header) {
reject(bad_request('if use_authorization_service_header is set, authorization_service_header needs to be set'));
if (!permission.authorization_service_header) {
reject(bad_request('if use_authorization_service_header is set, authorization_service_header needs to be set'));
}
} else if (permission.authorization_service_header) {
reject(bad_request('if authorization_service_header is set, use_authorization_service_header needs to be set'));
}

if (config_authorization.level !== 'payload') {
Expand Down

0 comments on commit abb079b

Please sign in to comment.