Poll Component permissions and viewer

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Poll Component permissions and viewer

Resistol
Hi all,

To support different types polls, we are using the Poll Component. Initially, we had trouble with the LockHelper but it turned out that we needed to add and extra domain permission (a facetrule on nt:unstructured) to allow the container structure to be created other than "polldata".  

However, we would like to get proper recommendations on the following intriguing issues:

1. Multiple users: We understand cookies are used to verify when a browser already submitted the poll. However, in our site, users are required to be authenticated and, thus, once a user has submitted a poll, other distinct users won't be able to submit (on the same machine) and they see only the results. Do we need to extend the code to support this? We also support different types of poll as we do not have only one per site!

2. View of data on CMS: All data is collected on the server in a specific location (polldata by default). It is not possible however for editors to verify the contents or results of the poll results within the CMS environment. Is there a way to provide regular moderators (editors) access to this poll info (no console is allowed for them)? What is the 'easiest' way to make this?
Reply | Threaded
Open this post in threaded view
|

Re: Poll Component permissions and viewer

Jeroen Hoffman
Hi,
Sorry for answering so late. See comments inline.

Jeroen

On 22-01-13 11:07, Resistol wrote:

> Hi all,
>
> To support different types polls, we are using the Poll Component.
> Initially, we had trouble with the LockHelper but it turned out that we
> needed to add and extra domain permission (a facetrule on nt:unstructured)
> to allow the container structure to be created other than "polldata".
>
> However, we would like to get proper recommendations on the following
> intriguing issues:
>
> 1. Multiple users: We understand cookies are used to verify when a browser
> already submitted the poll. However, in our site, users are required to be
> authenticated and, thus, once a user has submitted a poll, other distinct
> users won't be able to submit (on the same machine) and they see only the
> results. Do we need to extend the code to support this? We also support
> different types of poll as we do not have only one per site!


Yes, you'll have to extend the code. In the PollProvider [1], that does most of
the work, there are protected methods getPersistentValue/setPersistentValue for
that purpose.

[1]
https://forge.onehippo.org/svn/poll/poll/tags/poll-1.05.06/hst-client/src/main/java/org/onehippo/forge/poll/component/PollProvider.java

>
> 2. View of data on CMS: All data is collected on the server in a specific
> location (polldata by default). It is not possible however for editors to
> verify the contents or results of the poll results within the CMS
> environment. Is there a way to provide regular moderators (editors) access
> to this poll info (no console is allowed for them)? What is the 'easiest'
> way to make this?

Unfortunately there is no such thing yet.
It reminds me however of the EasyForms' Data Perspective [2], maybe you can
custom build something similar for a view on poll data?

[2] http://easy-forms.forge.onehippo.org/enabling_data_perspective.html

_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html