[Zope3-dev] Re: Permissions

2005-11-18 Thread Philipp von Weitershausen
Paul Volpato wrote:
> I have a template that simply displays 'Hello World' and in the
> zcml  I have declared the page as zope.Public.  But when I go to the
> pages  address I have to authenticate.  If I authenticate the page
> displays  fine.  But I can't seem to view it as an anonymous user.
> The page is a view on a Content Object (if that helps).
> 
> Any suggestions why this might be happening?

First, please don't ask questions that aren't related to the development
OF Zope 3 here. Questions related to the development WITH Zope 3 should
be posted to [EMAIL PROTECTED]

There are several possible sources for your problem, but the best would
be if you debug it yourself. The Debug skin will tell you which
permissions you're lacking when you get an Unauthorized error. In order
to force an Unauthorized error, I think you need to turn off the
credentials challenging.

Philipp
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Generations - a missed use case? (Evolving an application for the first time)

2005-11-18 Thread Jeff Shell
I have an application where I'm trying to use 'zope.app.generations'
for the first time. And after much pulling of hair and looking at the
core code, I found what may be a missed scenario.

Basically, we deployed this application for a customer and now they
want some changes. It changes the schema of one item to store values
in tuples instead of strings. I wrote an evolve module, 'evolve1.py'
in myapp.generations, made the schema manager, registered it as a
utility, bla bla bla. But my code seemed like it would never run.

I'd run the debuzope script and look at the database
root['zope.app.generations'], and there was 'myapp' with the value of
1. I'd keep deleting that key and committing the transaction, but my
code would still never run. I tried running it manually using
pdb.run() to step through it and make sure that it was finding the
right objects and doing its job. My code was fine. So I looked at the
code in zope.app.generations.generations and found this interesting
tidbit:

for key, manager in findManagers():
generation = generations.get(key)

if generation == manager.generation:
continue

if generation is None:
# This is a new database, so no old data

if IInstallableSchemaManager.providedBy(manager):
try:
manager.install(context)
except:
transaction.abort()
logging.getLogger('zope.app.generations').exception(
"Failed to install %s",
key)
raise

generations[key] = manager.generation
transaction.commit()
continue

 (the code continues from there

There's one problem here - in my situation, it's NOT A NEW DATABASE.
There is old data that needs to be evolved, but there's no record of a
generation for this application because there was no need for a schema
manager until now.

I really like the concept and general implementation of the schema
manager, but this scenario is driving me crazy. I could write an
'install' script, but that doesn't really cover this situation. After
install is run, the database marks the application generation. This
makes sense for new applications installing themselves - there's no
old data to update, so if the application is at generation 5, for
example, it doesn't need to be evolved to '5' if all of the data
that's installed or used is already in generation 5 form. (ie - if I
were deploying my application fresh today, my fields would already be
tuples instead of strings).

But my situation, where I already have a deployed application, is not
covered by this. I *could* write an 'install' script for the schema
manager that did this first evolution that I need to do. But then that
installer would have to be updated with all of the future evolutions
as well - since in theory, I could update an application from before
the schema manager and need to bring it up to generation 5 or 8 from
essentially 0.

It seems like the Schema Manager needs an 'evolve from 0' option, with
'0' being set by the evolution script of no previous evolution was
found but (somehow) existing data could be detected. The other
solutions seem to be:

* Write an install script that then manually calls all of the evolvers
to bring things up to the current generation.
* Always put a schema manager in your application, with the starting
generation of 0, so that you can upgrade in the future.

Neither option seems quite tenable - like a bad hack that goes against
the Zope 3 concepts. You shouldn't need a schema manager utility until
you need it, and having a script that manually does
'evolve1.evolve(context); evolve2.evolve(context)'... seems like it
goes against the sort of problem that the generations system is trying
to solve.

Is there something about the schema manager/generations system that I missed?
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Zope 3.2 release

2005-11-18 Thread Stephan Richter
On Friday 18 November 2005 07:09, Julien Anguenot wrote:
> > Originally we decided to release 3.2 on December 1. But this is not
> > feasible anymore, so a bug day on 02/12 seems good. On the other hand, I
> > really do not want to make a beta without all critical bugs being
> > addressed, so having bug fixing going on sooner would be better.
>
> Then what about adding one next week beside the one of the 02/12 ?
> Wednesday is a CPS bug day so any other day will be fine with me next week.

Next week is Thanks Giving Friday in the US. I will be on Cape Cod and will 
probably not take my laptop with me, so I won't be there. *But* I think this 
should not stop others from having a bug day!

Does anyone else have an opinion?

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Zope 3.2 release

2005-11-18 Thread Julien Anguenot
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Stephan Richter wrote:
> On Thursday 17 November 2005 09:52, Julien Anguenot wrote:
>>> Would people like to schedule another bug day?
>> Is the bug day of the 02/12 still planned ?
> 
> Originally we decided to release 3.2 on December 1. But this is not feasible 
> anymore, so a bug day on 02/12 seems good. On the other hand, I really do not 
> want to make a beta without all critical bugs being addressed, so having bug 
> fixing going on sooner would be better.
> 

Then what about adding one next week beside the one of the 02/12 ?
Wednesday is a CPS bug day so any other day will be fine with me next week.

J.

- --
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM   : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDfcRnGhoG8MxZ/pIRAiVSAJ9PU/8ZCgaICpFUQGpicDcs3J+N5QCffnSB
wqcOhejs9bhNREtvKGxgmww=
=Kmc2
-END PGP SIGNATURE-
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Permissions

2005-11-18 Thread Paul Volpato

Hi,
	I have a template that simply displays 'Hello World' and in the zcml  
I have declared the page as zope.Public.  But when I go to the pages  
address I have to authenticate.  If I authenticate the page displays  
fine.  But I can't seem to view it as an anonymous user.

The page is a view on a Content Object (if that helps).

Any suggestions why this might be happening?

Regards
Paul Volpato
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com