In Google Sheets, how can I view protected cells?

In my Google Sheets spreadsheet, I set protection for certain cells so that "Only You" can be edited (only I can edit it, but the text in the dialog box reads "you only"). The other cells have no protection. I would like to be able to run a script that adds a thick red border around each protected cell or, if that is not possible, add the border of each unprotected cell. I have tried various scripts, but I have found only the way to define the protection, but not to determine if the cell is protected or not, because if I can (myself) edit, then I can edit all cells in the spreadsheet. that do not have protection against cells that have protection, but I can change.