If user are able to edit and view their submissions, the private fields are visible for them.
Is it a bug or is it as expected. I need private fileds for staff comments f.e
ADDENDUM:
1) Components are displayed as a submission without regard to either private or webform results access. When displayed as a form, access is allowed when either the component isn't private OR the user was access to the webform results for this submission. This same access should be extended to the viewed results.
2) As part of a similar typo, the additional classes and wrapper are not added to viewed submission. Normallyt he class maybe omitted due to the simplicity of the output of the component, but the wrapper class should be included. While unrelated by symptom, this bug is caused by the exact same error in the code.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | webform-submission_private-2335547-5.patch | 1.38 KB | danchadwick |
Comments
Comment #1
danchadwick commentedYou will need to implement your own access, in that case. Private fields are visible to the submitter.
Comment #2
etron770 commentedthe strange thing is, that the private fields are unvisible when submitting the form, but not when viewing the form again.
do you know where in the code I can implement the access?
Comment #3
danchadwick commentedHmmm. Actually that sounds like a bug. Now the question is what is the expected behavior for a user who does NOT have access to "own webform results" for a private component while viewing the form, in the process of submitting a draft, viewing a submission, and editing a submission.
Comment #4
danchadwick commentedComment #6
danchadwick commentedCommitted to 7.x-4.x and 8.x.
Comment #7
etron770 commented#3
It would be really great (if possible) to have:
a (private) component with follwong checkboxes:
write access for special rules (checkboxes) and an additional for writeacces for the submitter
read access for special rules (checkboxes) and an additional checkbox for readacces for the submitter.
Example:
I have an registration form for a conference. There is are private fields for
registration date
payment date
pamyent ammount
these 3 must be edit by special roles and visible for the submitter (or a speciale role)
and I have a
comment text area
where I can write some staff comments which must not be visible to the submitter
Comment #8
danchadwick commented@etron770 -- This sort of specialized programming would not be part of webform. It sounds like you need a combination of hook_form_alter and the webform access api functions. We don't offer programming support in the webform issue queue, however. Try the forums or IRC.
Comment #9
etron770 commented#6
Thank your for your support (the patch is working fine)
#9
Maybe I am not the only one who would like to have this. I other words and maybe more simple:
It would be nice to have a checkbox to change that the admin is able to change and the submitter is able to see the values.
In other words a combination from before and after the patch as a new checkbox
sorry this was not my intention, I get the data easily, using markup field and PHP