Skip to content

Commit

Permalink
update superadmin method
Browse files Browse the repository at this point in the history
  • Loading branch information
priscillay-toast authored Oct 17, 2023
1 parent f64f49e commit df879ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Helpers/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ static function isSuperAdmin()
{
if ($defaultUser = Environment::getEnv('SS_DEFAULT_ADMIN_USERNAME')) {
if ($currentUser = Security::getCurrentUser()) {
return $currentUser->Email == $defaultUser;
// all toast email owner is a superadmin
return $currentUser->Email == $defaultUser || strstr($currentUser->Email, '@toast.co.nz');
}
}
return false;
Expand Down

0 comments on commit df879ad

Please sign in to comment.