Hi, I'm working with Zope 2.4.3 on a linux SuSE 7.0 system. I was just editing my homepage using a version ( called 'tmp' ) and 2 different browser windows ( mozilla 0.9.7 ). Then I decided that the changes I had done are ok, saved them and quited the version ( in the first browser window ). After that I found a small mistake in one of my sites and corrected it ( in the second browser window ). Somehow the version was still active and the changes were made inside it. But, it wasn't the same verion. The version the changes were made in is called 'No longer active'. I can start and quit working with that version by starting and quitting the original version tmp. But if I want to save / discard the canges there is just the message 'No unsaved work has been done in this version' The link of the version 'No longer active' points to the root directory of Zope ( I was working in the folder 'hausmann-family' ), but there is no version at all. How can I get rid of this version? Some files are locked and I can't delete them or do anything else with them. Thanks, Steffen -- Es gibt keine perfekten Menschen, nur perfekte Absichten.
Steffen Hausmann writes:
.... I can start and quit working with that version by starting and quitting the original version tmp. But if I want to save / discard the canges there is just the message 'No unsaved work has been done in this version' Go to "Control_Panel" --> "Version Management" and see what you can do from there.
I am sure, you will be at least able to discard the changes. But probably, you can also safe them. Dieter
On Mon, Feb 04, 2002 at 10:59:35PM +0100, Dieter Maurer wrote:
Steffen Hausmann writes:
.... I can start and quit working with that version by starting and quitting the original version tmp. But if I want to save / discard the canges there is just the message 'No unsaved work has been done in this version' Go to "Control_Panel" --> "Version Management" and see what you can do from there.
I am sure, you will be at least able to discard the changes. But probably, you can also safe them.
I tried out the things that were mentioned in 'How to get off version trouble?' before I wrote my first mail, but none of them worked. ( I should have mentioned this earlier... ). I can't do anything in the 'Version Management' field, because there is just a text saying 'There are no non-empty versions.' Thanks anyhow Steffen -- Es gibt keine perfekten Menschen, nur perfekte Absichten.
Hi All, I have a ZClass that I only want to be editable by certain persons, the same persons that have permission to create instances of this object. I created a new role with the 'Add My Class' permission enabled at the directory where where this all should happen. Now logins with this role (and this role only) can create instances of the Z-Class. But they cannot modify properties. How do I accomplish that? I tried going to the define properties tab of my Z Class and changing the value at the right of 'Manage properties' dropdown from Disabled to 'Add My ZClass', but this doesn't work and frankly, I don't really understand the whole screen and can't seem to find any documentation that explains it. Why are the permissions normally disabled, while any person with Role manager can actually 'manage properties' or have 'webdav access'? Any clues would be appreciated. Douwe
douwe@oberon.nl writes:
I have a ZClass that I only want to be editable by certain persons, the same persons that have permission to create instances of this object.
I created a new role with the 'Add My Class' permission enabled at the directory where where this all should happen. Now logins with this role (and this role only) can create instances of the Z-Class.
But they cannot modify properties. How do I accomplish that? Use the "Define Permissions" tab of the ZClass and map "Change properties" (or something similar) to "Create XXXX instance" (or another permission you like).
Dieter
Hi, Thanks for the tip. However this is more or less what I tried, ie I mapped Manage Properties to Add My Class (Manage Properties on the left side, Add My Class from the dropdown box on the right side) and I still get addProperty not allowed in this context. Douwe
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Dieter Maurer Sent: Friday, June 14, 2002 9:11 PM To: douwe@oberon.nl Cc: Zope Subject: Re: [Zope] ZClass and Permissions
douwe@oberon.nl writes:
I have a ZClass that I only want to be editable by certain persons, the same persons that have permission to create instances of this object.
I created a new role with the 'Add My Class' permission enabled at the directory where where this all should happen. Now logins with this role (and this role only) can create instances of the Z-Class.
But they cannot modify properties. How do I accomplish that? Use the "Define Permissions" tab of the ZClass and map "Change properties" (or something similar) to "Create XXXX instance" (or another permission you like).
Dieter
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
douwe@oberon.nl writes:
Thanks for the tip. However this is more or less what I tried, ie I mapped Manage Properties to Add My Class (Manage Properties on the left side, Add My Class from the dropdown box on the right side) That should work... and I still get addProperty not allowed in this context. You mean "manage_addProperty"?
Try the "Define Permissions" tab of the property sheet itself. And be sure, you specify the property sheet in your "manage_addProperty". Dieter
douwe@oberon.nl writes:
Thanks for the tip. However this is more or less what I tried, ie I mapped Manage Properties to Add My Class (Manage Properties on the left side, Add My Class from the dropdown box on the right side) That should work... and I still get addProperty not allowed in this context. You mean "manage_addProperty"? Yes, that's what I mean.
Try the "Define Permissions" tab of the property sheet itself. And be sure, you specify the property sheet in your "manage_addProperty". Hmm, maybe that is the problem. I am not using property sheets, but storing all needed properties directly in the z class object and I go to the Define permissions tab of the class, not of the property sheet.
Douwe
douwe@oberon.nl writes:
douwe@oberon.nl writes: ... property management problems with ZInstances ... Try the "Define Permissions" tab of the property sheet itself. And be sure, you specify the property sheet in your "manage_addProperty". Hmm, maybe that is the problem. I am not using property sheets, but storing all needed properties directly in the z class object and I go to the Define permissions tab of the class, not of the property sheet. Normal ZClasses are not PropertyManagers and do not have a "manage_addProperty" method.
You are sure that your have a base class that is a PropertyManager? Dieter
douwe@oberon.nl writes:
douwe@oberon.nl writes: ... property management problems with ZInstances ... Try the "Define Permissions" tab of the property sheet itself. And be sure, you specify the property sheet in your "manage_addProperty". Hmm, maybe that is the problem. I am not using property sheets, but storing all needed properties directly in the z class object and I go to the Define permissions tab of the class, not of the property sheet. Normal ZClasses are not PropertyManagers and do not have a "manage_addProperty" method.
You are sure that your have a base class that is a PropertyManager?
Correction: I'm having PropertyManager as a base class, because my ZClass is derived from DTMLDocument. Douwe
douwe@oberon.nl writes:
douwe@oberon.nl writes:
douwe@oberon.nl writes: ... property management problems with ZInstances ... Try the "Define Permissions" tab of the property sheet itself. And be sure, you specify the property sheet in your "manage_addProperty". Hmm, maybe that is the problem. I am not using property sheets, but storing all needed properties directly in the z class object and I go to the Define permissions tab of the class, not of the property sheet. Normal ZClasses are not PropertyManagers and do not have a "manage_addProperty" method.
You are sure that your have a base class that is a PropertyManager?
Correction: I'm having PropertyManager as a base class, because my ZClass is derived from DTMLDocument. If your ZClass is independent of non-Core products, you can may an export and send it to me.
I will try to figure out why you cannot add properties. Dieter
If your ZClass is independent of non-Core products, you can may an export and send it to me.
I will try to figure out why you cannot add properties.
Hi, Thanks for the offer. My ZClass is dependent not so much on non-Core stuff as well as on other ZClass'es. I'll just start over with a fresh class, implementing the basic things that went wrong and changes are that everything will work and if not, I'll post it. Meanwhile, during my new setup I started to wonder what the best way is to add instances of Z Class programmatically. There is a HOW-TO on this subject, but that seems to require either the usage of DTML, or an external method. I always use the following code: obj=context.manage_addProduct['test'].testDoc.createInObjectManager('newId', request) Is this correct? I sometimes get an error that I don't have access rights to testDoc? if it is correct, maybe this should be added to the howto, it seems more clean. Douwe
douwe@oberon.nl writes:
... Meanwhile, during my new setup I started to wonder what the best way is to add instances of Z Class programmatically. There is a HOW-TO on this subject, but that seems to require either the usage of DTML, or an external method.
I always use the following code: obj=context.manage_addProduct['test'].testDoc.createInObjectManager('newId', request)
Is this correct? Looks good!
I sometimes get an error that I don't have access rights to testDoc? I know that when the acquisition chain is broken, usually because a DTML object is called without its positional arguments.
The code above gives no hint towards this, though.
if it is correct, maybe this should be added to the howto, it seems more clean. Go ahead...
Dieter
If your ZClass is independent of non-Core products, you can may an export and send it to me.
I will try to figure out why you cannot add properties.
Dieter
Hi, Please find attached two .zexp files. test.zexp contains two z classes, testFolder and testDoc. testFolder is derived from ZFolder and has four methods, index_html, addItem, addProperty and editProperty. testDoc is derived from ZDTMLDocument and has no methods. Folder1.zexp contains a simple setup of these two classes, ie an instance of testFolder named Folder1, containing Doc1 and item as testDoc objects and acl_users, a User Folder. Also, a special role named IssueManager is defined here. The 'Add testDoc' and 'Add testFolder' permissions are allowed for IssueManager, Owner and Manager, everything else is Acquired. One user is defined in acl_user, klant with password klant and role IssueManager. This user can create instances of testDoc, which is testable by running addItem on Folder1 (after deleting the item that I already put there). This user however, cannot add properties (try running addProperty) or modify properties (try running editProperty, after adding the property with another user), although in the Define Permissions tab of testDoc the permission of 'Manage properties' has been mapped on 'Add testDoc', a permission the user klant has, since he can add instances of testDoc. This is the simplest setup I could construct (and it doesn't even look that simple), I hope you or somebody else can help me. Douwe
Douwe reported a problem that in his ZClass the permission "Manage properties" is mapped to "Add XXX" but a role with "Add XXX" permission is unable to manage properties. I analysed this problem: * The ZClass instance contains a correct "_permissionMapper" object. * When the permission "Manage properties" is resolved for a ZInstance, "ImPermissionRole" looks for "_Manage_properties_Permission". When it finds an attribute with this name and a string value, then it interprets this as a permission mapping and continues to look for this new permission. * In Douwes example, the ZInstance does not contain any "_Manage_properties_Permission", neither itself nor acquired nor its class. The class' permission mapping is ineffective for the ZInstance. I do not yet understand what happens here. Normally, I would say, that permission mappings are ineffective altogether. But, I saw lots of cases where the permission mapping was very effective. I will continue the investigation in the next few days... Dieter
On Sat, Feb 02, 2002 at 10:14:32PM +0100, Steffen Hausmann wrote:
Hi,
I'm working with Zope 2.4.3 on a linux SuSE 7.0 system.
I was just editing my homepage using a version ( called 'tmp' ) and 2 different browser windows ( mozilla 0.9.7 ). Then I decided that the changes I had done are ok, saved them and quited the version ( in the first browser window ).
After that I found a small mistake in one of my sites and corrected it ( in the second browser window ).
Somehow the version was still active and the changes were made inside it. But, it wasn't the same verion. The version the changes were made in is called 'No longer active'.
I can start and quit working with that version by starting and quitting the original version tmp. But if I want to save / discard the canges there is just the message 'No unsaved work has been done in this version'
The link of the version 'No longer active' points to the root directory of Zope ( I was working in the folder 'hausmann-family' ), but there is no version at all.
How can I get rid of this version? Some files are locked and I can't delete them or do anything else with them.
I finally managed to get rid of it. What I did was just to copy the whole folder and paste it again. MfG Steffen -- Physiker sind Kinder, die nie richtig erwachsen geworden sind.
participants (3)
-
Dieter Maurer -
douwe@oberon.nl -
Steffen Hausmann