/[drupal]/contributions/modules/jobsearch/access/job_access.module
ViewVC logotype

Diff of /contributions/modules/jobsearch/access/job_access.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2, Fri Jan 2 02:49:22 2009 UTC revision 1.2.2.1, Tue Oct 6 23:02:04 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
 // $Id$  
 // Copyright Khalid Baheyeldin 2006-2009 http://2bits.com  
2    
3  define('JOB_PERM_VIEW', 'view jobs');  define('JOB_PERM_VIEW', 'view jobs');
4    
 /**  
  * Implementation of hook_node_grants().  
  */  
5  function job_access_node_grants($account, $op) {  function job_access_node_grants($account, $op) {
6    $grants = array();    $grants = array();
7    if ($op == 'view' && user_access(JOB_PERM_VIEW, $account)) {    if ($op == 'view' && user_access(JOB_PERM_VIEW, $account)) {
# Line 15  function job_access_node_grants($account Line 10  function job_access_node_grants($account
10    return $grants;    return $grants;
11  }  }
12    
 /**  
  * Implementation of hook_node_access_records().  
  */  
13  function job_access_node_access_records($node) {  function job_access_node_access_records($node) {
14    $grants = array();    $grants = array();
15    if (variable_get(JOB_NODE_TYPE . $node->type, 0)) {    if (variable_get(JOB_NODE_TYPE . $node->type, 0)) {
# Line 33  function job_access_node_access_records( Line 25  function job_access_node_access_records(
25    return $grants;    return $grants;
26  }  }
27    
 /**  
  * Implementation of hook_perm().  
  */  
28  function job_access_perm() {  function job_access_perm() {
29    return array(    return array(
30      JOB_PERM_VIEW,      JOB_PERM_VIEW,

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.2.2.1

  ViewVC Help
Powered by ViewVC 1.1.2