To reproduce:

Create a view with two page displays: one for sorting, another for displaying the order.
Give only permissions "Use contextual links" and "Access draggable views" to a user and open display page. You won't see contextual link to a page that sets the order. This is a bug.

Interesting fact that if you give permission "Administer views", user will be able to see a link.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ygerasimov’s picture

Category: bug » support
Priority: Major » Normal
Status: Active » Fixed

There is a permission "Access draggable views" and it should restrict from having possibility to sort. Please check it and advise if it doesn't work.

supermoos’s picture

Status: Fixed » Active

And where am I suppose to find this permission? I can't see it anywhere?

supermoos’s picture

Okay, so I found it - but enabling it without also giving access to administering views is not possible? Or is it? It should be :-)

ygerasimov’s picture

Status: Active » Fixed

@supermoos I hope you don't test this with user no 1 as he passes all access checks.

Please try to logout (be anonymous user) and open same views page. Please advise whether you still can see ordering elements?

Also you can test login as another user and check whether he sees/doesn't see ordering elements depending on whether you give permission "Access draggable views" to authenticated users role.

supermoos’s picture

Already have that set up as follows: An editor role, given access to draggable views, but not views - a new user has been created who has this role = Can't see "order view" when clicking cogwheel on block, given access to views the same user can see the option.

ygerasimov’s picture

I am sorry I don't understand what do you mean by "clicking cogwheel on block". I would suggest to test on clean installation and write explanation how to reproduce the problem.

Please come online to IRC #drupal-contribute channel and contact me to discuss your problem.

ygerasimov’s picture

Category: support » bug
Status: Fixed » Active

updated summary

ygerasimov’s picture

Title: Allow Reordering permission not there? » Contextual link is not shown when only "Use contextual links" and "Access draggable views" permissions given.
ygerasimov’s picture

Status: Active » Fixed
supermoos’s picture

Could I just download the Snapshot from your latest commit and upload that? Should I disable the current version I have installed first? Og should I do a patch upgrade on just that one file?

ygerasimov’s picture

@supermoos You can clone from git repo (http://drupal.org/project/draggableviews/git-instructions). I would recommend reinstall module because I have added field api handler functionality.

Or you can wait till dev snapshot will be updated automatically.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Updated issue summary.

jaylotta’s picture

Issue summary: View changes
Status: Closed (fixed) » Active
jaylotta’s picture

I believe that in draggableviews_contextual_links_view_alter() the call to views_ui_contextual_links_suppress() is not necessary.

  // Do not add contextual link on view preview.
  if (!module_exists('views_ui')) {// && views_ui_contextual_links_suppress()) {
    return;
  }

If I comment out the call then the administer views permission is no longer required to render the context link for "Order View".

  • ygerasimov committed 5f9bb2b on 8.x-1.x
    Issue #1460014: Show contextual link even if user does not have "...
iStryker’s picture

Status: Active » Needs review
FileSize
538 bytes

I do not think we need that piece of code at all that suppress the link and checks the view_ui module is enabled. Contextual links do not appear if view_ui are not enabled.

There is special type of Contextual links in the preview view of views. I think this got rewritten somewhere in the last couple of years.

Patch to remove the lines of code attached.

iStryker’s picture

Should add that all the code after the check does not break or cause white screen of death that #1426810: DraggableViews gives the white screen of death when Views UI is disabled.

rooby’s picture

Status: Needs review » Reviewed & tested by the community

I see no reason for that code since the contextual link is not actually a views admin one it is a content admin one.

rooby’s picture

Status: Reviewed & tested by the community » Needs review

Actually I got a bit confused about what I was looking at in the previous comment.

The issue I have is different, the contextual links not displaying if views UI is disabled.

I think that is wrong because it is a content management link not a views UI link.

joelstein’s picture

Status: Needs review » Reviewed & tested by the community

The patch in #16 works perfectly. All that's needed is to grant the "Access draggable views" permission.

  • iStryker committed 8d5e591 on 7.x-2.x
    Issue #1460014 by iStryker: Contextual link is not shown when only "Use...
iStryker’s picture

Status: Reviewed & tested by the community » Fixed

#16 Committed.

Status: Fixed » Closed (fixed)

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