[Zope-dev] Product Icon

2001-10-05 Thread brian.r.brinegar.1


I am currently working on a product which has the sole purpose of
referencing other objects. One of the properties is the path to
another Zope object. Then methods are defined like getObject(),
getPath(). We use it as a way to manage news and events that show
on several sites that opperate on our Zope server. It allows one
group to add a news document in their folder and if another group
would like that news item to show on their site they can create a
reference to it.

Anyway, what happens from time to time is an object is referencing
another object when it gets deleted/renamed/moved and that breaks the
reference. The product handles this gracefully, however I would like
to have the icon change from our standard icon to a broken icon.

Any hints?

--Brian Brinegar
  ECN Web Technician
  MSEE 104 A 494-3106
  http://www.geeksoft.net/



___
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] Product Icon

2001-10-05 Thread brian.r.brinegar.1

On Fri, 5 Oct 2001, marc lindahl wrote:

We have schools, research groups, students, and administration that we
deal with. A school may create a news document about a new professor which
they would wish to display for 6 weeks. The administration offices may
only wish to display the story for 1 week.

The display dates for the news documents are properties of the documents.

So I really need two different instances of the same property one for the
school and one for the administration. However the administration probably
has no permission other than View on the schools News Document so
something like this would not work.

We want to avoid maintaining two copies of the same story at all costs.

The system I came up with was to let the administration create a
reference to the schools news object where they could add their own
properties or override the values of existing ones.

If there is an editable record where an object could be
cataloged and then the meta date for a cataloged object could be changed
by the owner of the catalog it would provide the same functionality. I
could just give each group a catalog and some methods of adding news to
the catalog. They could then edit the meta_data in the catalog to change
the display periods, priority, etc. And the display routine could use the
meta_data in each groups catalog when displaying the object rather than
the objects properties.

Can this be done with Plugable Brains?

If you have any other suggestions/hints/tips let me know.

--Brian

> Why not use the Catalog for this?
>
> e.g. in the CMF, there's 'Topic' which does basically that.
>
> > From: "brian.r.brinegar.1" <[EMAIL PROTECTED]>
> > Date: Fri, 5 Oct 2001 16:04:36 -0500 (EST)
> > To: <[EMAIL PROTECTED]>
> > Subject: [Zope-dev] Product Icon
> >
> >
> > I am currently working on a product which has the sole purpose of
> > referencing other objects. One of the properties is the path to
> > another Zope object. Then methods are defined like getObject(),
> > getPath(). We use it as a way to manage news and events that show
> > on several sites that opperate on our Zope server. It allows one
> > group to add a news document in their folder and if another group
> > would like that news item to show on their site they can create a
> > reference to it.
> >
> > Anyway, what happens from time to time is an object is referencing
> > another object when it gets deleted/renamed/moved and that breaks the
> > reference. The product handles this gracefully, however I would like
> > to have the icon change from our standard icon to a broken icon.
> >
> > Any hints?
> >
> > --Brian Brinegar
> > ECN Web Technician
> > MSEE 104 A 494-3106
> > http://www.geeksoft.net/
> >
> >
> >
> > ___
> > 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 )
>
>

--Brian Brinegar
  ECN Web Technician
  MSEE 104 A 494-3106
  http://www.geeksoft.net/



___
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] ZCatalog UnpickleableError

2001-10-18 Thread brian.r.brinegar.1

Under a 2.4.1 install I recieve the following error while trying to add a
ZCatalog.

Traceback (innermost last):
  File /data/www/Zope/src/Zope-2.4.1-src/lib/python/ZPublisher/Publish.py,
line 223, in publish_module
  File /data/www/Zope/src/Zope-2.4.1-src/lib/python/ZPublisher/Publish.py,
line 187, in publish
  File /data/www/Zope/src/Zope-2.4.1-src/lib/python/Zope/__init__.py, line
226, in zpublisher_exception_hook
  File /data/www/Zope/src/Zope-2.4.1-src/lib/python/ZPublisher/Publish.py,
line 175, in publish
  File /data/www/Zope/src/Zope-2.4.1-src/lib/python/Zope/__init__.py, line
240, in commit
  File /data/www/Zope/src/Zope-2.4.1-src/lib/python/ZODB/Transaction.py,
line 302, in commit
  File /data/www/Zope/src/Zope-2.4.1-src/lib/python/ZODB/Connection.py,
line 418, in commit
(Info: (('Products.PluginIndexes.TextIndex.GlobbingLexicon',
'GlobbingLexicon'), '\x00\x00\x00\x00\x00\t\xb1\xac', ''))
UnpickleableError: Cannot pickle  objects

Any hints on debugging/fixing the problem?

--Brian Brinegar
  ECN Web Technician
  MSEE 104 A 494-3106
  http://www.geeksoft.net/



___
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] User Folders and Zope security

2001-11-02 Thread brian.r.brinegar.1

We have a custom UserFolder that authenticates users agains a PH
directory. This means that we have the same 30,000 or so users defined in
all of our user folder instances.

Seeing no reason to redefine users in multiple user folders we made a
decission to place one user folder in the root of our system and then
grant users local roles on an object by object basis.

Everything works great!

Problem:
We would like to have some roles assigned dynamically based on user
information. For example: A role called "Staff" if the PH directory has
the user listed as staff. We would like to be able to do this on an object
by object basis, but have the roles only exist for a single request. So
we don't have to give 15,000 people a local role and then track who leaves
and who gets hired.

Example:
Folder hierarchy:

/Work

We would like something in "Work" that says if the authenticated user is
staff they get the local role "Staff" The user would be defined in the
User Folder in the root.

We're open to any solutions/comments.

Thanks,

--Brian Brinegar
  ECN Web Technician
  MSEE 104 A 494-3106
  http://www.geeksoft.net/



___
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] User Folders and Zope security

2001-11-02 Thread brian.r.brinegar.1

On Fri, 2 Nov 2001, Stephan Richter wrote:

>
> >We would like something in "Work" that says if the authenticated user is
> >staff they get the local role "Staff" The user would be defined in the
> >User Folder in the root.
>
> I think the problem is rather trivial. Since you wrote your own user folder
> it is so easy to add custom roles.
>
> Do you have the directory path? I guess so.
>
> So you should able to figure out whether a user is a member of a certain
> group by parsing the path.
> Then you create the roles based on the group behavior.
>
> All you gotta do now is to overwrite the API method getRoles(self) (in
> User) and add the new roles to the return list. This way it is always
> generated on the fly and if the user changes directories the roles will
> change as well.

We have two folders and a user folder in the root:

/folder1
/folder2
/acl_users

inside of each of the folders I have a script called authorize that
returns a list of roles for that context based on user information.

if someone accesses /folder1 and gets the manager role I wanted it to be
tied to the folder1 object. Not available within folder2 so having it just
add those roles to getRoles doesn't work. Because the roles are associated
with the user folder in the root, not the folder.

--Brian Brinegar
  ECN Web Technician
  MSEE 104 A 494-3106
  http://www.geeksoft.net/



___
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] PathIndex

2001-11-21 Thread brian.r.brinegar.1


The search method of PathIndex class returns varying types depending on
the success of the search.

If the search fails a list object is returned, if the search succeeds an
object of type BTrees.IIBTree.IISet is returned.

This causes a problem in _apply_index in PathIndex when PathIndex tries to
do either a union or intersection.

I am doing a search of a catalog like this:

catalog.searchResults(path=['/folder1','/folder2'])

This should return all objects in the catalog that are inside of folder1
or folder2 and works perfectly as long as objects from both folder1 and
folder2 exist in the catalog.

However if say folder2 does not exist then _apply_index tries to do a
union between a list and an IISet object. This raises an invalid argument
exception.

I'm not 100% sure where this problem should be addressed, but a quick fix
I saw was to change part of _apply_index in PathIndex from:

if operator=="or": set_func = union
else: set_func = intersection

res = None

for k in record.keys:
rows = self.search(k,level)
res = set_func(res, rows)

To something like this:

if operator=="or": set_func = union
else: set_runc = intersection

res = None

for k in record.keys:
rows = self.search(k,level)
if rows == []:
rows = None
res = set_func(res,rows)

This works since union and intersection will take None as an argument but
not an empty list.

I would suggest PathIndex.search be changed to return an empty IISet if it
fails just to have consistancy.

Let me know what you think

--Brian Brinegar
  ECN Web Technician
  MSEE 104 A 494-3106
  http://www.geeksoft.net/



___
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] ZCatalogIndexes

2001-10-17 Thread brian.r.brinegar.1


A bug in ZCatalog/dtml/manageIndex.dtml prevents users from adding Indexes
without having JavaScript enabled. The manageIndex.dtml form submits to
addIndexForm which was used before PluginIndexes (2.4 I think).

ZCatalog/dtml/addIndexForm.dtml is no longer needed

ZCatalog/dtml/manageIndex.dtml needs the following changes to work without
javascript:

line 75:

Change to:


line 77:
http://www.geeksoft.net/



___
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] ZCatalogIndexes

2001-10-17 Thread brian.r.brinegar.1

I was a little off in my previous fix:

Line 75 in ZCatalog/dtml/manageIndex.dtml should be:


Without the "Indexes/" at the end of the action indexes still get added,
however the form submits back to the Contents of the ZCatalog instead of
the index listing.

Sorry,

--Brian Brinegar
  ECN Web Technician
  MSEE 104 A 494-3106
  http://www.geeksoft.net/



___
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] User Groups

2001-12-11 Thread brian.r.brinegar.1

I've found that it would be very useful to be able to define groups of
users and then grant a local role to that group rather than individual
users.

For example we have multiple groups working together on our Zope
installation and there are certian objects my group may want to share with
another group. We can grant all the members of that group permission,
however if they hire someone new they have to notify the maintainers of
every object their group has access to.

Are there plans for anything to solve this problem?

The idea implementation I see would be a centralized group management
system (maybe in the control panel) and then ability to grant roles to the
group. But this would require changing core pieces of Zope. Any ideas on
implementation?

--Brian Brinegar
  ECN Web Technician
  MSEE 104 A 494-3106
  http://www.geeksoft.net/



___
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] Zope 2.5b3 Management Tabs

2002-01-09 Thread brian.r.brinegar.1

I've noticed in a fresh install Zope 2.5b3 management tabs which users do
not have access to view show up. In the past only management tabs that a
user had permission to view the associated action showed up. Is this a
known issue? or a new feature?

--Brian Brinegar
  ECN Web Technician
  MSEE 104 A 494-3106
  http://www.geeksoft.net/



___
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] Permissions

2002-05-10 Thread brian.r.brinegar.1

Hello,

I would like to setup the security on a Zope server such that a user can
edit permissions on something they own, but not grant more permissions
than what they have acquired from the parent.

If a user owns a folder they could grant "Owner" any permissions
they want inside of that folder (Assuming they have the "Change
permission" permission). Is there a way to limit which permissions a user
can change?

I would like to be able to delegate permissions. Such that if a user
creates a folder they can grant other roles permissions up to the
permissions they have acquired from the parent folder. Is this possible?

I don't want that user to be able to grant themselves additional
permissions.

Thanks,
-Brian Brinegar




___
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] ExternalEditor & Windows

2002-05-21 Thread brian.r.brinegar.1

Hello,

I'm working on porting Casey Duncans ExternalEditor helper application to
work with Windows. I've got some stuff working, but it's far from
complete. I was wondering if anyone else was working on this? I would hate
to be duplicating efforts, but I would love to help.

-Brian





___
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] ExternalEditor & Windows

2002-05-22 Thread brian.r.brinegar.1

On Tue, 21 May 2002, Casey Duncan wrote:

> I totally agree. And I still intend to deliver one that runs native on
> windows, probably just using the windows scripting host.
>
> This version will hopefully tide people over for the time being.
>
> -Casey
>

I've started a VB Script version for the Windows Scripting Host. Right now
I'm in the proof of concept stage. I've got something that opens a file,
spawns an editor, gets the process id, and can PUT a file to Zope. (works
with SSL too)

I haven't figured out how to check if a process has exited.

I would like some suggestions on how to handle the config file, I'll
probably use the same format as the Python version, but I would also like
to take advantage of the Content-type registry Windows has.

I'll keep the list up to date on my progress.

-Brian



___
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] ExternalEditor & Windows

2002-05-22 Thread brian.r.brinegar.1

On Wed, 22 May 2002, Behrens Matt - Grand Rapids wrote:

> brian.r.brinegar.1 wrote:
>
> > I've started a VB Script version for the Windows Scripting Host. Right now
> > I'm in the proof of concept stage. I've got something that opens a file,
> > spawns an editor, gets the process id, and can PUT a file to Zope. (works
> > with SSL too)
>
> Please pardon my Windows ignorance, but does using WSH mean that IE will
> be required to be used?
>

Nope, in fact I'm testing it with Netscape. :-)

-Brian





___
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] ZopeTime Warp

2002-07-08 Thread brian.r.brinegar.1


Zope Version
   (Zope 2.5.1 (source release, python 2.1, linux2), python 2.1.3, linux2)

Python Version 2.1.3
   (#1, May 15 2002, 15:52:42) [GCC 2.95.4 20011002 (Debian prerelease)

I've got this script which returns strange results:

print context.ZopeTime()
print context.ZopeTime().toZone('US/East-Indiana')

print context.ZopeTime().strftime('%H:%M%p - %m/%d/%Y %Z')
print context.ZopeTime().toZone('US/East-Indiana').strftime('%H:%M%p -
%m/%d/%Y %Z')

return printed

The output from this script is:

2002/07/08 16:24:44.687 US/Eastern
2002/07/08 16:24:44.689 US/East-Indiana
17:24PM - 07/08/2002 EST
16:24PM - 07/08/2002 EST

The output of the 3rd test case is incorrect. It's as if strftime is
changing the time zone. Also the time zone is set to US/East-Indiana in
/etc/timezone, yet the default time zone for Zope Time is US/Eastern.

We do not want our users to have to manually set the time zone with the
toZone method.

Any hints?

Thanks,
-Brian




___
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] DCOracle2 Binding Array

2002-08-09 Thread brian.r.brinegar.1

While using the DCOracle2 module outside of Zope I recieve the following
traceback:

Traceback (most recent call last):
  File "/dev/fd/4", line 206, in ?
File "/dev/fd/4", line 206, in ?
  File "./modules/Calendar.py", line 193, in dayGroupView
reservation = Reservation(conflict)
  File "./modules/Reservation.py", line 27, in __init__
self.load(id)
  File "./modules/Reservation.py", line 134, in load
sth.execute(sql, id)
  File
"/opt/python/2.2.1-update1/sparc-sunos5.8/lib/python2.2/site-packages/DCOracle2/DCOracle2.py",
line 876, in execute
return self.executemany(operation,p)
  File
"/opt/python/2.2.1-update1/sparc-sunos5.8/lib/python2.2/site-packages/DCOracle2/DCOracle2.py",
line 1036, in executemany
baoa[c][br] = p
OverflowError: Assigned value too large  for Binding Array

I have tried the SQL outside of python and it works fine. This also worked
correctly before upgrading to DCOracle2.

Any help?

Thanks,
-Brian


___
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] WebDAV access for DTML Methods and Documents

2002-08-15 Thread brian.r.brinegar.1

Hello,

This may be something that cannot easily be fixed, but the permission "FTP
Access" is required for a user to have "WebDAV Access" to an object. Since
the method is shared by FTP and WebDAV a more general permission name
should be used.

Thanks,
-Brian


___
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] ZEO, FileStorage, and Undo

2002-08-20 Thread brian.r.brinegar.1

Hello,

We have a large FileStorage database ~5 gigs. When any of our users click
would the "Undo" tab in a management screen the request would eventually
time out and our ZopeWatch script would restart the server.

Well this didn't happen every time, it only happens if 20 transactions
haven't occurred, or haven't occurred recently. In either of these cases
the entire ZODB is searched for transactions.

So I wrote a patch for undoLog in FileStorage to batch by days instead of
# of transactions. This lets us show batches of 2 days at a time instead
of 20 transactions. Thus we never have to search more than 2 days worth of
the database. I also MonkeyPatched the manage_UndoForm in App.UndoSupport.

While doing this I noticed that at the beginning of undoLog FileStorage
acquires a lock (_lock_acquire). Is this necessary if it's only doing
reads?

We have a ZEO with 3 Zeo Clients and 1 Zeo Server when someone hits Undo
the Zeo Server locks and all 3 clients sit waiting. It
appears from experience as a user that_lock_acquire locks reads and
writes.

We have a system with potential for thousands of content maintainers. It
is undesirable to have our entire site die for 20 seconds everytime
one of them clicks "Undo". We could disable Undos, however the
transactional database was one of the reasons we choose Zope.

Any suggestions? Is there a way to lock only for writes? So that pages can
still be served?

Thank you,
-Brian Brinegar
 ECN Web Systems Developer
 Purdue University
 West Lafayette, IN


___
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 )