Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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.
Comment | File | Size | Author |
---|---|---|---|
#16 | remove_unnessary_contextual_checks-1460014-16.patch | 538 bytes | iStryker |
Comments
Comment #1
ygerasimov CreditAttribution: ygerasimov commentedThere 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.
Comment #2
supermoos CreditAttribution: supermoos commentedAnd where am I suppose to find this permission? I can't see it anywhere?
Comment #3
supermoos CreditAttribution: supermoos commentedOkay, so I found it - but enabling it without also giving access to administering views is not possible? Or is it? It should be :-)
Comment #4
ygerasimov CreditAttribution: ygerasimov commented@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.
Comment #5
supermoos CreditAttribution: supermoos commentedAlready 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.
Comment #6
ygerasimov CreditAttribution: ygerasimov commentedI 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.
Comment #7
ygerasimov CreditAttribution: ygerasimov commentedupdated summary
Comment #8
ygerasimov CreditAttribution: ygerasimov commentedComment #9
ygerasimov CreditAttribution: ygerasimov commentedFixed. See commit http://drupalcode.org/project/draggableviews.git/commit/5f9bb2b
Comment #10
supermoos CreditAttribution: supermoos commentedCould 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?
Comment #11
ygerasimov CreditAttribution: ygerasimov commented@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.
Comment #12.0
(not verified) CreditAttribution: commentedUpdated issue summary.
Comment #13
jaylotta CreditAttribution: jaylotta commentedComment #14
jaylotta CreditAttribution: jaylotta commentedI believe that in draggableviews_contextual_links_view_alter() the call to views_ui_contextual_links_suppress() is not necessary.
If I comment out the call then the administer views permission is no longer required to render the context link for "Order View".
Comment #16
iStryker CreditAttribution: iStryker commentedI 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.
Comment #17
iStryker CreditAttribution: iStryker commentedShould 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.
Comment #18
rooby CreditAttribution: rooby commentedI see no reason for that code since the contextual link is not actually a views admin one it is a content admin one.
Comment #19
rooby CreditAttribution: rooby commentedActually 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.
Comment #20
joelstein CreditAttribution: joelstein at On Fire Media commentedThe patch in #16 works perfectly. All that's needed is to grant the "Access draggable views" permission.
Comment #22
iStryker CreditAttribution: iStryker commented#16 Committed.