Created
January 15, 2013 17:53
-
-
Save nhart/4540478 to your computer and use it in GitHub Desktop.
token access
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function islandora_object_datastream_tokened_access_callback($perm, $object = NULL, $datastream = NULL) { | |
module_load_include('inc', 'islandora', 'includes/utilities'); | |
$token = filter_input(INPUT_GET, 'token', FILTER_SANITIZE_STRING); | |
$token_access = islandora_validate_object_token($object->id, $datastream->id, $token); | |
if(islandora_object_datastream_access_callback($perm, $object, $datastream) || $token_access) { // | |
return TRUE; | |
} | |
else { | |
return FALSE; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment