Hi all,

I'm trying to set up forms so that certain roles can edit all submissions linked by an edit link in a view. I am trying to avoiding giving them the "Access all Webform Results" permission.

All permissions are set correctly, but when these users edit a submission that someone else created, the edit saves, but they get a permission denied message.

I assumed this is because they don't have the "Access all Webform Submissions" permission.

So I went to change that and whammy! There is no such permission.

Am I missing this permission or does it not exist?

It seems like a practical one.

Any thoughts?

Comments

pmoz’s picture

Issue summary: View changes
DanChadwick’s picture

Category: Feature request » Support request
Status: Active » Fixed

I suspect your issue is that link being generated by the view, assuming you are using the special built-in edit link, is intended for users who have access to the submission list. It includes a destination URL query argument.

What you probably want instead is to create your own edit link in views using the node ID and submission ID, You can include your own destination query argument (?destination=path/to/my/view).

pmoz’s picture

Thanks for the prompt response Dan.

Can you lead me to a more thorough implementation of this?

DanChadwick’s picture

Issue tags: -permissions

Something like
- Add the NID to the view, but don't display it
- Add the SID to the view, but
-- Rewrite it's output as "Edit"
-- Display as link, setting the link to node/[nid]/sid/[sid]/edit?destination=path/where/i/want/to/go/when/done

pmoz’s picture

Thanks!

Let me give that a try.

pmoz’s picture

With this path: node/[nid]/sid/[sid]/edit?destination=viewname, it opens a blank webform.

When I hover over the link, it is populating correctly with the sid and nid.

pmoz’s picture

node/[nid]/submission/[sid]/edit?destination=viewname works as expected.

DanChadwick’s picture

Sorry change sid to submission.

Please continue on your own. I don't have the resources for this level of site building and views support. Good luck!

pmoz’s picture

Thanks for your direction.

pmoz’s picture

The only downfall to this method appears to be that the edit link is displayed for every user.

If they click on it, they get the permission denied error.

Almost all of the way there thanks to Dan.

Status: Fixed » Closed (fixed)

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

rohanb105’s picture

Hi Dan,

I have use case where i am accepting values in a webform, showing some of it in a view with some filters. Now i want to display that complete record of submission to everyone.
With this View link i am able to display user submission but there is a problem. Permission required for this to work is "Access all webform results" which give open permission to edit and delete. Since Submissions is embedded in Results tab i dont know a way to decouple it and just display that submission # to the user (without giving access to all webform results)

This shows what i am doing with displaying results with a search filter and "View" link

Image