I am coming from KaOS, and they implement a way that asks the user for its password, when Kate detects that you have no right to save a file or document.
That is especially convenient, when you like to create a file on the fly in a protected area, without hitting the command line.
And you're asking what? I ask cause SGS is correct, open say pacman.conf in Kate, make your changes, click close, click save when it pops up, and you will be asked to enter your password to be able to save the file with your edits.
DO NOT DO THE ABOVE UNLESS YOU NEED TO. IT'S AN EXAMPLE ONLY.