Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Prevent users adding non-existing Members to Security Groups

Go to End

3 Posts   1418 Views


Community Member, 94 Posts

15 March 2010 at 4:34am

Yo SS-folk

Is it possible to prevent users from adding new Members to Security Groups via the Security Admin? That is, if the Member doesn't already exist, the user is prevented or given an error when they try to add them to a Group? For the site I'm working on I'm decorating Member and managing it via ModelAdmin so I'd rather users couldn't also add Members via the Security Admin accidentally/on-purpose.



Forum Moderator, 801 Posts

13 April 2010 at 8:33pm

Not directly... You could extend MemberTableField->addToGroup() to check for a customized Member->canCreate() callback.


Community Member, 94 Posts

14 April 2010 at 4:47pm

Hi Ingo

Thanks for getting back to me on this. The context for my query is in this post here - I'd be very keen to hear your feedback on it?

I'll have a good look at MemberTableField and see what I can do. Your suggestion sounds like a pretty neat way to do it.