#839 - How to set permissions to Users module?
Hi, Jason! Need to restrict access at leat to Edit profiles by users or even access to users detailview (for non-admin users or for manager group).
Is it possible?
Thanks in advance
Hi, Jason! Need to restrict access at leat to Edit profiles by users or even access to users detailview (for non-admin users or for manager group).
Is it possible?
Thanks in advance
10 years ago
For a user's own profile? You'll probably need to just custom code something to check for that and take the appropriate action.
10 years ago
THanks! What is more natural way to check: $current_user belong or not belong to groupname? (to place this condition to if() in the hook) Thanks
10 years ago
Sure, there are a few ways. One is to call getUserSecurityGroups() in SecurityGroup.php and pass the current user ID. Then see if the desired group is in the returned array. It's not a static function and I apologize for that, but still easy enough to set up and call.
10 years ago
Thanks i will try
10 years ago
Closing out. Feel free to follow up if you have any more questions on this one.