simpletestauto_test_access

Definition

simpletestauto_test_access($op, $node)
simpletestauto.inc, line 179

Code

<?php
function simpletestauto_test_access($op, $node) {
  global $user;
  if ($op == 'create') {
    // if server is not used to catch patches nobody is allowed to create patch node
    if (variable_get('simpletestauto_catch_patch',0)) {
      return user_access('create simpletestauto_test');
    }
    else {
      return FALSE;
    }
  }
  
  if ($op == 'update' || $op == 'delete') {
  	if (user_access('edit own simpletestauto_test')  && ($user->uid == $node->uid)) {
  	  return TRUE;
  	}
  }
}
?>