You are here

function views_service_get_access in Services 6.2

Same name and namespace in other branches
  1. 6 services/views_service/views_service.inc \views_service_get_access()
  2. 7 services/views_service/views_service.inc \views_service_get_access()

Check the access permission to a given views.

Parameters

view_name: String. The views name.

Return value

Boolean. TRUE if the user is allowed to load the given view.

1 string reference to 'views_service_get_access'
views_service_service in services/views_service/views_service.module
Implementation of hook_service().

File

services/views_service/views_service.inc, line 71
Link general views functionalities to services module.

Code

function views_service_get_access($view_name) {
  $view = views_get_view($view_name);
  if (empty($view)) {
    return FALSE;
  }
  return $view
    ->access('default');
}