Hi! I'm sorry to report this, but I get a very strange, yet simple to explain bug:

  1. I tick 'Enable permissions per webform'
  2. (The form folds out)
  3. I press save at page bottom
  4. (page refreshes)
  5. Drupal says: The form settings have been updated.
  6. But 'Enable permissions per webform' is unticked again (de-activated)

Other settings on that page do save when I change them.
Edit: it only happens with certain webforms... there must be something wrong with my site...

Otherwebform modules installed are:

  • Webform Pathauto
  • Webform Validation
  • Webform rules (deactivated after a try-out session)
CommentFileSizeAuthor
#7 permissions_per_webform.module.patch530 bytesmikeskull

Comments

Jelmer85’s picture

Issue summary: View changes

added additional description

dwieeb’s picture

Category: bug » support

Permissions per Webform detects any differences between the individual webform settings and the global webform settings. If there are no differences between those two sets of settings, the checkbox automatically deactivates.

Try changing the individual settings to what you need them to be; then, it should save.

Jelmer85’s picture

Status: Active » Closed (works as designed)

Ah I see! You're right and it worked.
Maybe provide a small notification somewhere in future updates? From an interaction design point of view, it's a little confusing.
But nevermind, I'm very glad I've found this module! :-)

Jelmer85’s picture

Issue summary: View changes

added the edit line

Renee S’s picture

Issue summary: View changes
Status: Closed (works as designed) » Active

I'm seeing this, but not exactly this... "Enable permissions per webform" checkbox works, but when I change any of the Access/Edit/Delete Own permissions checkboxes, on save it doesn't stick. The top Access/Edit/Delete global constellation does; but the "own" doesn't. Am I missing something similarly UI-ish?

Renee S’s picture

Hmmm.... ok, maybe this helps to debug, and it does seem like a (very minor) bug: I was trying to uncheck "authenticated user" and just leave "administrator" under Access/Edit/Delete Own submissions. When I checked "administrator" and "some other role", it saved. It just didn't like me unchecking authenticated without checking something else instead.

brianbrarian’s picture

I just ran into this issue, and I can confirm what Renee S reported (#4) two years ago.

I suggest that the the configuration instructions on the project page be updated to mention that administrator + another role need to be selected.

mikeskull’s picture

Simple enough to debug, array_diff only returns values from array 1 that arent in array 2, problem is if youre adding more permissions than existed before. A true array_diff is done via:

$diff = array_merge(array_diff($values, $default), array_diff($default, $values));

change line 244 in the module to this and itll save everything fine.

mikeskull’s picture

StatusFileSize
new530 bytes

Oh and heres a small patch for those that want it.

rjbrown99’s picture

Status: Active » Needs review

Updating issue status to indicate a patch is here.

arx-e’s picture

I had the same problem. The "Enable permissions per webform" could not be activated unless I changed something in the first row of permissions. Changing the settings in the second row of permissions "Access/edit/delete own ..." the second row of permissions will not result in the Enabled state being saved.
I tried the patch in #4 and it works for saving the state of the settings.
But the settings do not seem to have any effect. Users that should be prevented from accessing and editing their submissions ar still able to do so.