- Posts: 6
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
How to restrict access to menu entries to LimeSurvey administrators
- alexandrelefebvre
- Topic Author
- Offline
- New Member
Less
More
4 years 3 months ago #192555
by alexandrelefebvre
How to restrict access to menu entries to LimeSurvey administrators was created by alexandrelefebvre
Hello,
We've installed LimeSurvey and are generating Surveys from a third-party application using the LimeSurvey API.
We wanted to restrict the functions made available to survey owners, typically enabling them only to change the survey structure (questions and groups).
We did so by deleting altogether some of the entries in the Menu entries configuration.
However, what we really wanted was: some menu entries be only available to LimeSurvey administrators (e.g. editing text elements), but not to "regular" survey owners.
We've tried to implement it by modifying the Users properties of such menu entries, but the result was that the survey administration screen would be empty.
So, our question is: is there a way to restrict menu entries to be accessible only for LimeSurvey administrators (or designated users)?
If yes, could you please describe how to configure menu entries permissions in order to achieve this expected behaviour?
Thanks in advance for your reply,
Best regards,
alex
We've installed LimeSurvey and are generating Surveys from a third-party application using the LimeSurvey API.
We wanted to restrict the functions made available to survey owners, typically enabling them only to change the survey structure (questions and groups).
We did so by deleting altogether some of the entries in the Menu entries configuration.
However, what we really wanted was: some menu entries be only available to LimeSurvey administrators (e.g. editing text elements), but not to "regular" survey owners.
We've tried to implement it by modifying the Users properties of such menu entries, but the result was that the survey administration screen would be empty.
So, our question is: is there a way to restrict menu entries to be accessible only for LimeSurvey administrators (or designated users)?
If yes, could you please describe how to configure menu entries permissions in order to achieve this expected behaviour?
Thanks in advance for your reply,
Best regards,
alex
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
4 years 3 months ago #192557
by jelo
You might state, what version of LimeSurvey you currently use. LS3?
I recommend to look at LimeSurvey 4.0 (currently not ready for production, but available as a release candidate).
The user permission control gets an improvement there. I'm afraid that it still won't be what you're looking for, but you can submit a feature request based on LS4, which is the only version new features will be implemented.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic How to restrict access to menu entries to LimeSurvey administrators
No.alexandrelefebvre wrote: So, our question is: is there a way to restrict menu entries to be accessible only for LimeSurvey administrators (or designated users)?
You might state, what version of LimeSurvey you currently use. LS3?
I recommend to look at LimeSurvey 4.0 (currently not ready for production, but available as a release candidate).
The user permission control gets an improvement there. I'm afraid that it still won't be what you're looking for, but you can submit a feature request based on LS4, which is the only version new features will be implemented.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: alexandrelefebvre
The topic has been locked.
- alexandrelefebvre
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
4 years 3 months ago #192558
by alexandrelefebvre
Replied by alexandrelefebvre on topic How to restrict access to menu entries to LimeSurvey administrators
Thanks Jelo for your prompt feedback!
Best regards,
alex
Best regards,
alex
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13622
- Thank you received: 2490
4 years 3 months ago #192567
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic How to restrict access to menu entries to LimeSurvey administrators
I don't understand why check with 4.0 : Permission are not improved in 4.X
You need to construct a plugin for this : manual.limesurvey.org/BeforeHasPermission
It happen too for Survey owner.
To disallow update of any survey : something like this :
But something i don't understand : you want to allow user to create survey but disallow them to edit ???? Seems really strange …
You need to construct a plugin for this : manual.limesurvey.org/BeforeHasPermission
It happen too for Survey owner.
To disallow update of any survey : something like this :
Code:
if( $this->event->get('sEntityName') == 'survey' && $this->event->get('sPermission') == 'surveycontent' && $this->event->get('sCRUD') == 'update') { $this->event->set('bPermission',false); }
But something i don't understand : you want to allow user to create survey but disallow them to edit ???? Seems really strange …
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- alexandrelefebvre
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
4 years 3 months ago #192569
by alexandrelefebvre
Replied by alexandrelefebvre on topic How to restrict access to menu entries to LimeSurvey administrators
Thanks Denis,
We'll look into the plugin solution.
About your question: using the LS API, we create the survey and register the user as the owner. We want users to be able to customize the questions, question groups, but not the other attributes of the survey.
In particular, information about the survey itself is managed in the third-party application (the one which calls the LS API to create the survey). When we create the survey using the API, the introduction contains a back link to the description, and we wanted to avoid synchronizing back and forth information which the owner may have modified inside the survey.
Hope this helps understanding.
Best regards and thanks again,
alex
We'll look into the plugin solution.
About your question: using the LS API, we create the survey and register the user as the owner. We want users to be able to customize the questions, question groups, but not the other attributes of the survey.
In particular, information about the survey itself is managed in the third-party application (the one which calls the LS API to create the survey). When we create the survey using the API, the introduction contains a back link to the description, and we wanted to avoid synchronizing back and forth information which the owner may have modified inside the survey.
Hope this helps understanding.
Best regards and thanks again,
alex
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13622
- Thank you received: 2490
4 years 3 months ago #192571
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic How to restrict access to menu entries to LimeSurvey administrators
You can not set Permission to specific survey via API (real question, i didn't use API a lot) ?
Because maybe best is to give needed permission only ?
Else : you want to give ONLY surveycontent permission,
then
if( $this->event->get('sEntityName') == 'survey' && $this->event->get('sPermission') !== 'surveycontent') {
$this->event->set('bPermission',false);
}
or check sPermission one by one (surveylocale, surveysecurity etc …)
Because maybe best is to give needed permission only ?
Else : you want to give ONLY surveycontent permission,
then
if( $this->event->get('sEntityName') == 'survey' && $this->event->get('sPermission') !== 'surveycontent') {
$this->event->set('bPermission',false);
}
or check sPermission one by one (surveylocale, surveysecurity etc …)
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: alexandrelefebvre
The topic has been locked.
- alexandrelefebvre
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
4 years 3 months ago #192579
by alexandrelefebvre
Replied by alexandrelefebvre on topic How to restrict access to menu entries to LimeSurvey administrators
From what I understand, API
manual.limesurvey.org/RemoteControl_2_API
does not provide methods to change survey permissions.
Thanks for the other tip though.
Thanks for the other tip though.
The topic has been locked.