access() function does not respect disabled views displays. It checks only for the disabled views. When a view display is disabled it should be not accessible.

Comments

boychev’s picture

Status: Active » Needs review
StatusFileSize
new706 bytes

By adding these 3 lines of code into the access() function the bug should be fixed.

      if (isset($this->display[$display_id]->display_options['enabled']) && $this->display[$display_id]->display_options['enabled'] == FALSE) {
        return FALSE;
      }

Status: Needs review » Needs work

The last submitted patch, views-disabled_views_dislpay_access-1988998-1.patch, failed testing.

Mołot’s picture

Status: Needs work » Needs review

3.5 is 2 versions behind current stable. Are you sute this bug is present in current version? And in dev?

Mołot’s picture

boychev’s picture

Status: Needs review » Needs work
StatusFileSize
new935 bytes

Fixed!

boychev’s picture

Yes, the bug still exist. My last patch is for the 7.h-3.x version.

boychev’s picture

Status: Needs work » Needs review

Needs review

boychev’s picture

Sorry for the removed empty line :)

Status: Needs review » Needs work

The last submitted patch, views-disabled_views_dislpay_access-1988998-8.patch, failed testing.

Mołot’s picture

Well, make it pass tests and hope more people will be interested. I might try it myself for you, but only when testbot will give it a green light.

boychev’s picture

I think the problem with the testbot comes from the version. The issue was for 7.x-3.5.

boychev’s picture

Version: 7.x-3.5 » 7.x-3.x-dev
Status: Needs work » Needs review
chris matthews’s picture

Issue summary: View changes
Status: Needs review » Needs work
Issue tags: +Needs reroll

The 6 year old patch in #8 to view.inc does not apply to the latest views 7.x-3.x-dev.

Checking patch includes/view.inc...
error: while searching for:
    // calls this one.
    $displays = (array)$displays;
    foreach ($displays as $display_id) {
      if (!empty($this->display[$display_id]->handler)) {
        if ($this->display[$display_id]->handler->access($account)) {
          return TRUE;

error: patch failed: includes/view.inc:1497
error: includes/view.inc: patch does not apply
andrew answer’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new678 bytes

Patch rerolled.