Change Authorized used in summarize comments class
What does this MR do and why?
The code diff updates the authorization logic for summarizing comments. Previously, it used the Utils::ChatAuthorizer
to check if the user is allowed to summarize comments. Now, it uses the Gitlab::Llm::Utils::Authorizer
and checks the user's permissions on the resource (e.g., issue or merge request) they are trying to summarize comments for. This change ensures that only authorized users can summarize comments, enhancing security and access control.
ChatAuthorizer was not correct to use here due to slightly different requirements.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.