[Zope-dev] TransparentFolderPatch and Security

2001-06-14 Thread Andre Schubert

Hi all,

I have found a bug with Transp√ľarent FolderPatch and ZopeSecurity.
Let me explain my structure.

root:
folder 1:
foo:
bar:
foobar:
foo 1:
bar 1:
Let me say that folder 1 is a normal Folder, foo and bar and foo 1 and
bar 1 are orignal TransparentFolders and foobar  is my own Product which
is a Foder with
_is_transparent=1.

The problem is, that ONLY if i want view the Security-Tab in folder 1
the following error occurs:

!--
Traceback (innermost last):
  File /usr/lib/python1.5/site-packages/ZPublisher/Publish.py, line 222,
in publish_module
  File /usr/lib/python1.5/site-packages/ZPublisher/Publish.py, line 187,
in publish
  File /usr/share/zope/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
(Object: Traversable)
  File /usr/lib/python1.5/site-packages/ZPublisher/Publish.py, line 171,
in publish
  File /usr/lib/python1.5/site-packages/ZPublisher/mapply.py, line 160,
in mapply
(Object: manage_access)
  File /usr/lib/python1.5/site-packages/ZPublisher/Publish.py, line 112,
in call_object
(Object: manage_access)
  File /usr/share/zope/lib/python/AccessControl/Role.py, line 257, in
manage_access
(Object: Traversable)
  File /usr/share/zope/lib/python/App/special_dtml.py, line 120, in
__call__
(Object: access)
  File
/usr/share/zope_2.2/Zope-2.2.0-src/lib/python/Products/ZDebug/DTMLLocator.py,
line 103, in __call__
(Object: access)
  File /usr/lib/python1.5/site-packages/DocumentTemplate/DT_String.py,
line 528, in __call__
(Object: access)
  File
/usr/share/zope_2.2/Zope-2.2.0-src/lib/python/Products/ZDebug/DTMLDebug.py,
line 288, in debug_render_blocks
  File
/usr/share/zope_2.2/Zope-2.2.0-src/lib/python/Products/ZDebug/DTMLDebug.py,
line 286, in debug_render_blocks
  File /usr/lib/python1.5/site-packages/DocumentTemplate/DT_With.py,
line 146, in render
(Object: _.namespace(valid_roles=valid_roles()))
  File
/usr/share/zope_2.2/Zope-2.2.0-src/lib/python/Products/ZDebug/DTMLDebug.py,
line 288, in debug_render_blocks
  File
/usr/share/zope_2.2/Zope-2.2.0-src/lib/python/Products/ZDebug/DTMLDebug.py,
line 221, in debugException
(Object: renderwob)
  File
/usr/share/zope_2.2/Zope-2.2.0-src/lib/python/Products/ZDebug/DTMLDebug.py,
line 286, in debug_render_blocks
  File /usr/lib/python1.5/site-packages/DocumentTemplate/DT_In.py, line
630, in renderwob
(Object: permission_settings)
  File /usr/share/zope/lib/python/AccessControl/Role.py, line 183, in
permission_settings
(Object: Traversable)
  File /usr/share/zope/lib/python/AccessControl/Role.py, line 178, in
lambda
AttributeError: (see above)

--

can anyone help or explain me what happens

thanks as


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: PossitionIndex (was: Re: [Zope-dev] ZCatalog phrase indexingrevisited)

2001-06-14 Thread Chris McDonough

Excellent!  I haven't looked at it in detail, but thanks very much for
contributing it! Maybe we can roll some of this work into a position-aware
Text Index, or maybe even a new kind of Pluggable Index.

- C

- Original Message -
From: Erik Enge [EMAIL PROTECTED]
To: Chris McDonough [EMAIL PROTECTED]
Cc: Oren Yosifon [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, June 14, 2001 12:45 PM
Subject: Re: PossitionIndex (was: Re: [Zope-dev] ZCatalog phrase
indexingrevisited)


 On Thu, 14 Jun 2001, Erik Enge wrote:

  Me got a patch: URL:http://nittin.net/erik/software/PossitionIndex.

 And I should mention that it has only been tested on Zope 2.3.2.

 (BTW, thanks, Chris, for suggesting how to code it.)




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] symbolic link to another object in the Zope DB

2001-06-14 Thread Tim McLaughlin

Has anybody seen a product that lets you make the equivalent of a symbolic
link in unix in the Zope DB?

Thanks,
Tim

_
Tim McLaughlin
iterationZERO - www.iterationzero.com
703-481-2233


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] symbolic link to another object in the Zope DB

2001-06-14 Thread Joachim Werner

 Has anybody seen a product that lets you make the equivalent of a symbolic
 link in unix in the Zope DB?


http://www.zope.org/Members/hathawsh/Symlink

(VERY experimental ...)

Joachim


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] getItem() changed in 2.3.2?

2001-06-14 Thread Bill Anderson

OK, the code below worked fine in 2.3.1 ..
===
user_ids=context.getUserNames()
users=[]
for i in user_ids:
  activity=context.UserSource.getItem(i).Active
  if activity==1:
state='Active'
  else:
state='Inactive'
users.append([context.getItem(i).id,state,context.getItem(i).getFullName()])
return users
===

But now, in 2.3.2, it returns an AttributeError for __call__. I've been
able to determine that  context,UserSource.getItem(i) is returning i for
some reason.

IOW, if i is a username, call to getItem returns the username.

now, of course, trying to get attributes from string is futile, but why
is it now returning a string, as opposed to the object? Did I miss
something?


Bill

--
Bill Anderson   Linux Specialist
Modular Network Storage RD   
Random Redmond Quote:
Portable: survives system reboot.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Re: DTML-Python confusion (RE: [Zope] How to make a script return rendered dtml)

2001-06-14 Thread Evan Simpson

Bjorn Stabell wrote:

 Is it possible to append an object to the namespace?  Isn't that what
 dtml-with does?


It does, but there's some magic involved (non-mapping objects have to be 
wrapped in an adaptor first) and it uses an interface that isn't 
available in a restricted code environment such as Scripts.

 But the other way around, calling Python functions from DTML (via
 dtml-var func) the positional arguments are gotten from the namespace,
 right?


Not for just any Python functions, no.  For Scripts, yes, *if* you use 
the Bindings tab of the Script to give a name to the caller's namespace. 
  The reasoning here is that a Script won't do anything with the 
caller's namespace unless you tell it to.  Otherwise you have to use 
dtml-var expr=func(x,y,z) type notation.


 So why do so many DTML methods / documents have REQUEST as an explicit
 argument?  It looks like a convention that has to mean something.


That's just the generic call signature of DTML.  If the callee is to 
have implicit access to the REQUEST, you have to either pass the REQUEST 
itself or a proper namespace as the second parameter.   DTML was never 
really designed to be called with explicit parameters.

 I am a little bit confused about the fact that the acquisition path is
 related to how the document was called, not just to the containment
 relationships it is involved in.  Or is it?  myobj.aq_parent isn't
 necessarily the object that contains myobj?


Correct.  Acquisition is a complex subject, and a lot has been written 
about it on Zope.org.  When you write /A/B, B could be contained in 
either A or / (the root), but its acquisition parent is A.


 Is the namespace stack basically the same as the acquisition path?

Nope.  Each Zope object on the namespace stack has its own acquisition 
wrapper.  Fortunately, there usually aren't very many Zope objects on 
the stack.

Cheers,

Evan @ digicool


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )