client_applications_acl

Versions
mediamosa-174
client_applications_acl($access, $caid)

Custom acl function.

▾ 6 functions call client_applications_acl()

client_applications_list in client_applications/client_applications.module
Callback of the 'vpx/client_applications' path Shows client applications list
client_applications_list in client_applications/client_applications.module
Callback of the 'vpx/client_applications' path Shows client applications list
client_applications_list in client_applications/client_applications.module
Callback of the 'vpx/client_applications' path Shows client applications list
vpx_history_acl in vpx_history/vpx_history.module
vpx_history_acl in vpx_history/vpx_history.module
vpx_history_acl in vpx_history/vpx_history.module

Code

client_applications/client_applications.module, line 108

<?php
function client_applications_acl($access, $caid) {
  global $user;
  if ($user->uid == 1) { // admin
    return TRUE;
  }
  $owner = db_result(db_query("SELECT owner FROM {client_applications} WHERE caid = %d", $caid));
  if ($owner == '') { // no owner set
    return TRUE;
  }
  return user_access($access) && in_array($owner, $user->roles);
}
?>