How to restrict the Portal type
Dear Sir I have created many portal type in the Plone, Now I want to restrict for my portal type, only some role can use my portal type. Coul you show me how to sold this problem? Thank you.
I have created many portal type in the Plone, Now I want to restrict for my portal type, only some role can use my portal type. Coul you show me how to sold this problem?
This came up on plone-users last month, and I wrote this:
Thanks for the clarification on one point. However, I'm not sure how to hide what appears in the Select drop down menu in Plone, no matter which version of Collector is being used. I want to *remove* references to the Collector (whichever version) from Plone's Member interface, which I assume is a function of the ZMI. My problem is that I can't find where that's done, and then how.
CMF doesn't currently make this easy; seems that it was not expected that types would be restricted on a per-user basis. However, types shouldn't show up if one doesn't have permission to create them. To this end, you can try to use the ZMI security settings to remove the ability of regular users to add Collector things, provided said things have their own permissions, which is not the case with all the default portal content and some external products. You can extend these classes and provide your own security assertions, of course, and then make the types tool use your new class instead. The real way is to give types a list of allowable roles (or security in some manner) and use this for the dropdown box and other machinery. But as we're getting into the CMF core, perhaps this is more a topic for zope-cmf@zope.org. Would be a good feature to have. --jcc (repetition repeats) -- "My point and period will be throughly wrought, Or well or ill, as this day's battle's fought."
participants (2)
-
Chy Ty -
J. Cameron Cooper