Support from Acquia helps fund testing for Drupal Acquia logo

Comments

eugene.ilyin’s picture

Status: Active » Needs review
indytechcook’s picture

Status: Needs review » Needs work

Thanks eugene, A few comments below.

+++ b/views/views_handler_field_bean_delete_link.incundefined
@@ -0,0 +1,49 @@
+  function render_link($bean) {
+    if (user_access('administer beans')) {
+      $this->options['alter']['make_link'] = TRUE;
+      $this->options['alter']['path'] = "block/$bean->delta/delete";
+      $this->options['alter']['query'] = drupal_get_destination();
+      $text = !empty($this->options['text']) ? $this->options['text'] : t('delete');
+      return $text;
+    }

Let's use bean_access here instead of the administer beans permission

+++ b/views/views_handler_field_bean_edit_link.incundefined
@@ -0,0 +1,49 @@
+  function render_link($bean) {
+    if (user_access('administer beans')) {
+      $this->options['alter']['make_link'] = TRUE;
+      $this->options['alter']['path'] = "block/$bean->delta/edit";
+      $this->options['alter']['query'] = drupal_get_destination();
+      $text = !empty($this->options['text']) ? $this->options['text'] : t('edit');
+      return $text;
+    }

Same here with bean_access

eugene.ilyin’s picture

Status: Needs work » Needs review
FileSize
5.32 KB
eugene.ilyin’s picture

Sorry, previous patch is wrong. Use this patch please.
I will be very grateful to you, if you add me as author of commit.

indytechcook’s picture

eugene.ilyin’s picture

Thank you also!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

/