An administrator wants to view a saved SMTP password occasionally. That does not mean every settings-page response needs to contain it, hidden behind a row of dots.
Separate the normal view from recovery
The ordinary page can show that a value is stored without returning the value itself. A deliberate reveal action can require a fresh authentication check, verify the administrator's current permission and return only the requested secret.
Check the server response, not just the visual field. A password input can still contain a complete value in the HTML. Hiding it with CSS or JavaScript does not prevent the browser from receiving it.
Keep the action narrow
Use protections appropriate to the application, including request validation, rate limits and responses that should not be cached. Do not let an ordinary user call the same reveal route by changing a query parameter.
Document the difference between re-entering the same password and using a separate authentication factor. They provide different assurances. Test with fictional credentials and accounts for each role.
The useful boundary is server-side authorization before disclosure. The number of dots in a form is not an access-control check.