View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|17227||Feature requests||User / Groups / Roles||public||2021-04-06 10:48||2021-04-07 08:20|
|Summary||17227: Set permissions (or role) for new users automatically|
it would be really nice to be able to assign a role to newly created users automatically.
We use Limesurvey in a corporate environment and let the ldap plugin handle the user creation for us. However, we still have to manually assign the same default (global) permissions to every new user because the 'Create Survey' permission is not sufficient in our case. We created a role for that purpose to save some clicks, but it would be nice to automate this process even further. So, either of the following options would be nice:
- define a set of perms that should be applied to each user at the time of creation
- have a button in the role definiton window that says sth. like 'Make this the default for new users'
- or anything that accomplishes the same thing
In the long run, it would be even cooler to outsource this to the ldap plugin and have certain perms tied to AD group memberships. But this is quite a long shot and as I said we would be more than happy with a simple solution that 'just works' :)
Kind regards and keep up the good work, you guys rock! :)
|Tags||No tags attached.|
Plugin can do it i think ?
I think https://manual.limesurvey.org/AfterSuccessfulLogin can check if roles is set, and set it of not.
Can be a core plugin.
|This plugin looks like it should do the trick, but where do I find it? It is not listed in the Plugin-Manager menu and the Limestore does not turn up any results either.|
Such pluigin didn't exist currently,
BUT : if you need something on short time delay : it's the quickest way. Because new feature come only in 4.5 / develop version currently.
Maybe check https://www.limesurvey.com/customization
|Ah I see, so I need to create the plugin myself and the 'AfterSuccessfulLogin' is just a trigger that I can use within my plugin?|
Yes, i think .
I never used , but clearly : it's the quickest way :).
Since you already use AuthLDAP : you can
1. Rename AuthLDAP to MyAuthLDAP (need rename dirctory and class)
2. Hacking at https://github.com/LimeSurvey/LimeSurvey/blob/7f22568b2e722019597beb670aeea59f8fb239d5/application/core/plugins/AuthLDAP/AuthLDAP.php#L561
|Ok I'll try my best. Thank you for your help! :) This issue can be closed now.|
Let's get open : maybe some other user can want it.
Then : you can make the pull request :)
|2021-04-06 10:48||fbrei||New Issue|
|2021-04-06 10:50||DenisChenu||Note Added: 63808|
|2021-04-06 11:35||fbrei||Note Added: 63811|
|2021-04-06 11:38||DenisChenu||Note Added: 63812|
|2021-04-06 11:40||fbrei||Note Added: 63813|
|2021-04-06 11:47||DenisChenu||Note Added: 63814|
|2021-04-06 12:53||fbrei||Note Added: 63817|
|2021-04-06 12:55||DenisChenu||Note Added: 63818|
|2021-04-07 08:20||c_schmitz||Project||Bug reports => Feature requests|