From b2e6ca8040d254b05f88e27df297a813ab6c3a31 Mon Sep 17 00:00:00 2001 From: Adam Vessey <adam-vessey@users.noreply.github.com> Date: Tue, 19 Sep 2017 16:56:21 -0300 Subject: [PATCH] Object context for permission. --- includes/manage_collection.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/manage_collection.inc b/includes/manage_collection.inc index 091f732..3239fdf 100644 --- a/includes/manage_collection.inc +++ b/includes/manage_collection.inc @@ -113,7 +113,7 @@ function islandora_basic_collection_create_child_collection_form(array $form, ar $parent_object = islandora_object_load($form_state['islandora']['shared_storage']['parent']); // Permissions handling. - if (!user_access(ISLANDORA_BASIC_COLLECTION_CREATE_CHILD_COLLECTION)) { + if (!islandora_object_access(ISLANDORA_BASIC_COLLECTION_CREATE_CHILD_COLLECTION, $parent_object)) { drupal_set_message(t('You do not have permissions to create collections.'), 'error'); drupal_goto('islandora/object/' . $parent_object->id); }