You are here

function _pwa_webpush_save_access in Progressive Web App 7.2

Check the HTTP method as well as the permission.

Parameters

$perm:

Return value

bool

1 string reference to '_pwa_webpush_save_access'
pwa_webpush_menu in modules/pwa_webpush/pwa_webpush.module
Implements hook_menu().

File

modules/pwa_webpush/pwa_webpush.module, line 173

Code

function _pwa_webpush_save_access($perm, $methods) {
  if (!in_array($_SERVER['REQUEST_METHOD'], $methods)) {
    return FALSE;
  }
  return _pwa_access_check($perm);
}