Comments

mrmikedewolf’s picture

damienmckenna’s picture

Status: Active » Closed (works as designed)

This is by design. The view is kept generic so that it can be readily reused, and then the page that actually displays the view takes care of the permissions. Should someone clone the view to customize it, etc then it's up to them to make sure it still has the appropriate permissions.

dave reid’s picture

Are these views enabled by default at all? This seems at least like we could put the basic security permission around, rather than leaving it open by default.

jelo’s picture

Both views are enabled by default. I am using 7.x-1.5+36-dev. Actually, the security review module complains about it straight away. I support adding basic access control.

damienmckenna’s picture

Status: Closed (works as designed) » Needs review

ok, *Fine* ;-)

damienmckenna’s picture

Version: 7.x-1.5 » 7.x-1.x-dev
damienmckenna’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

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

chris burge’s picture

Category: Task » Bug report
Status: Closed (fixed) » Active

The patch committed from this issue has caused a regression. It adds a permission check to the 'fieldable_pane_entity_revisions' view. The 'administer fieldable panels panes' permission is now required to access the view.

The view is used exclusively on the FPP entity revision page, which is already controlled by an access callback:

  $items['admin/structure/fieldable-panels-panes/view/%fieldable_panels_panes/revision'] = array(
    'title' => 'Revisions',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'fieldable_panels_panes_entity_list_revisions_page',
    'page arguments' => array(4),
    'access callback' => 'fieldable_panels_panes_access',
    'access arguments' => array('delete', 4),
    'weight' => -7,
  ) + $base;

Access to the page requires the delete permission for the bundle; however, access to the view requires the 'administer fieldable panels panes' permission. As a result, all users with the delete permission for the bundle but not the 'administer fieldable panels panes' permission will get a WSOD.

I don't disagree access control should be implemented for the view; however, it appears a Views access plugin is necessary.

damienmckenna’s picture

Assigned: mrmikedewolf » Unassigned
azinck’s picture

+1 to #10. This is a regression. It makes no sense to have 2 separate permission checks that have to be kept in sync. Why exactly can't we rely on the page's callback here?

azinck’s picture

Status: Active » Needs review
StatusFileSize
new958 bytes

Patch that just focuses on the revisions view. I would think we could also remove the custom access plugin for the fieldable_pane_entities since I think it's in the same situation but I didn't quite follow all of the discussion in #2207625: Add permission to list fieldable panel panes so I just left that alone for now.

damienmckenna’s picture

StatusFileSize
new5.08 KB

The idea is that administrative views are bundled with an administrative-level permission by default. Unfortunately if the views are disabled then views_embed_views() doesn't work.

Throwing some darts at the dartboard.

What if we got rid of fieldable_panels_panes_access_callback() and just worked off fieldable_panels_panes_access()? Need to do some testing with this, and probably write more tests.

Status: Needs review » Needs work

The last submitted patch, 14: fieldable_panels_panes-n2390145-14.patch, failed testing.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new5.64 KB
new1.16 KB

Lets see if the tests can be made green.

damienmckenna’s picture

Ok, tests are green, but I really feel we need additional tests.

damienmckenna’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests