When we are customizing prestashop up to greater extend, we forget to put some small codes and it leads to major security bugs. I have received few queries in the past regarding such issues where prestashop were using as B2B marketplace and not the standard / independent prestashop store.
To check, weather logged in user is Actual admin of store or not, just add following codes to test,
Note: I have tested below code in Prestashop Backend but i didn't test this code for frontend customization.
$cookie = new Cookie('psAdmin');
// your code