diff --git a/app/controllers/api/base_controller/authentication.rb b/app/controllers/api/base_controller/authentication.rb index ff239e801a..609932a4f5 100644 --- a/app/controllers/api/base_controller/authentication.rb +++ b/app/controllers/api/base_controller/authentication.rb @@ -44,6 +44,7 @@ def userid_to_userobj(userid) def authorize_user_group(user_obj) group_name = request.headers[HttpHeaders::MIQ_GROUP] if group_name.present? + group_name = CGI.unescape(group_name) group_obj = user_obj.miq_groups.find_by(:description => group_name) raise AuthenticationError, "Invalid Authorization Group #{group_name} specified" if group_obj.nil? user_obj.current_group_by_description = group_name