I have created a content type and I want to disable_role_aquisition in default wherever I add the content type. Can I do it without going to sharing tab.
Option: set __ac_local_roles_block__ = 1 as class variable in your code
__ac_local_roles_block__ = 1
which could be set inside an event subscriber
Thanks, but you are telling for the particular object but I want to disable for the content type
Again, take your time for reading and understand my answers.
Option 1 allows you to set the property on the class which is obviously what you are asking for and that is what I clearly mentioned. What is unclear here?
Is this what you are recomending
Try it out and report back if it does not work.
Nothing happened means what? Nobody can and will help you if you do not provide further details.
Both options are perfectly working (basically since almost 20 years, since the existence of Zope).
See the implementation
which is doing the same as suggested.
The only thing that might be needed for existing content objects is that you need to reindex them or call
obj.reindexObjectSecurity() for every affected content object after the particular change to the base class.
Code of Conduct –
Hosting courtesy of Rackspace