[Zope-CMF] Q: how to forbid users to join?
Shane Hathaway
shane@digicool.com
Fri, 01 Jun 2001 11:11:33 -0400
Jens Quade wrote:
>
> Heiko Stoermer <heiko.stoermer@andreas-schmid.de> writes:
>
> > how do I disable the whole "join" functionality of CMF?
> > I want only these users be able to log in that I have in my LDAPLoginAdapter
> > folder.
>
> To remove the functionality, you have to remove addMember (or replace
> by an empty function) from the RegistrationTool.
> (the addMember function in the MembershipTool called by the
> RegistrationTool is private, so it should be difficult to abuse it).
>
> To remove the join action from the action box, you have to overwrite
> listActions in the ActionsTool.
>
> # This will eventually be configurable through the portal_actions UI.
>
> I'll soon have to implement both changes myself, so I'm interested
> in the actual implementation you choose...
Ahem!
1) Disable the "Add portal member" permission for anonymous.
2) Do a CVS update. As of 5 minutes ago, ActionsTool now checks for the
"Add portal member" permission before displaying the "Join" link.
Now, there are some customizations that aren't going to be this easy.
But you can customize every bit of the CMF without touching the core
code and without creating a "hotfix" product. You can subclass and
replace the tools instead. I'm sure there's a document somewhere that
talks about that.
Shane