Hi,
I've a zclass wich inherits from
ObjectManager. Inside this
class, I've more classes that are ObjectManagers as
well.
I'd like to prevent that the user import, export, delete, copy,
cut, paste,
and rename the
objects inside the parent class.
But I want to
restore this permissions (except Import/Export)
in the subclases.
I've already reached the first part (delete
objects and disabling Import/Export). I just do the
following
in the constructor method:
<dtml-with
"ParentClass.createInObjectManager(REQUEST['id'], REQUEST)">
Disabling Delete, Import and
Export
<dtml-call "manage_permission('Delete
objects')">
<dtml-call
"manage_permission('Import/Export objects')">
<dtml-with
"Subclass1.createInObjectManager('id1',REQUEST)">
<dtml-call
"manage_permission('Delete
objects',['Manager'])">
</dtml-with>
<dtml-with
"Subclass2.createInObjectManager('id2',REQUEST)">
<dtml-call
"manage_permission('Delete
objects',['Manager'])">
</dtml-with>
<dtml-with
"Subclass3.createInObjectManager('id3',REQUEST)">
<dtml-call
"manage_permission('Delete
objects',['Manager'])">
</dtml-with>
And the "delete" button isn't shown
anymore. I tried to do
the same for cut, copy, paste, and
rename, but I found that
I would have to
disable the 'View management screens'
permission. It
doesn't have any sense because I want that
the user view
the manage
interface for that object, but with
some restrictions.
How can I reach this?
Thanks in
advanced,
Josef.