You are here

function views_service_get_access in Services 6

Same name and namespace in other branches
  1. 6.2 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 40
@author Services Dev Team

Code

function views_service_get_access($view_name) {
  $view = views_get_view($view_name);
  if (empty($view)) {
    return FALSE;
  }
  global $user;
  return views_access($view);
}