[Repoze-dev] bfg_view throwing an error during scan

2010-11-08 Thread Thomas G. Willis
And I'm not sure what I'm doing wrong if anything.

http://pastebin.com/g6DkvdR6


  File /Users/twillis/projects/testblob/app.py, line 78, in app
config.scan(package=views)
  File 
/Users/twillis/projects/cr-buttrcup/ext/repoze.bfg/repoze/bfg/configuration.py,
line 1455, in scan
  File /Users/twillis/projects/cr-buttrcup/ext/venusian/venusian/__init__.py,
line 40, in scan
  File /Users/twillis/projects/cr-buttrcup/ext/venusian/venusian/__init__.py,
line 37, in invoke
  File /Users/twillis/projects/cr-buttrcup/ext/repoze.bfg/repoze/bfg/view.py,
line 426, in callback
  File 
/Users/twillis/projects/cr-buttrcup/ext/repoze.bfg/repoze/bfg/configuration.py,
line 947, in add_view
  File 
/Users/twillis/projects/cr-buttrcup/ext/repoze.bfg/repoze/bfg/configuration.py,
line 275, in _derive_view
  File 
/Users/twillis/projects/cr-buttrcup/ext/repoze.bfg/repoze/bfg/configuration.py,
line 2364, in _map_view
  File 
/Users/twillis/projects/cr-buttrcup/ext/repoze.bfg/repoze/bfg/configuration.py,
line 2303, in requestonly
TypeError: object of type 'NoneType' has no len()


Any one run across this before?

Thomas G. Willis
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] bfg_view throwing an error during scan

2010-11-08 Thread Thomas G. Willis
Sorry, as with all things, as soon as I reach out for help he answer
becomes clear.

I had the arguments reversed in the view.

request,context needs to be context,request

sorry for the noise

Thomas G. Willis



On Mon, Nov 8, 2010 at 9:44 AM, Thomas G. Willis tom.wil...@gmail.com wrote:
 And I'm not sure what I'm doing wrong if anything.

 http://pastebin.com/g6DkvdR6


  File /Users/twillis/projects/testblob/app.py, line 78, in app
    config.scan(package=views)
  File 
 /Users/twillis/projects/cr-buttrcup/ext/repoze.bfg/repoze/bfg/configuration.py,
 line 1455, in scan
  File /Users/twillis/projects/cr-buttrcup/ext/venusian/venusian/__init__.py,
 line 40, in scan
  File /Users/twillis/projects/cr-buttrcup/ext/venusian/venusian/__init__.py,
 line 37, in invoke
  File /Users/twillis/projects/cr-buttrcup/ext/repoze.bfg/repoze/bfg/view.py,
 line 426, in callback
  File 
 /Users/twillis/projects/cr-buttrcup/ext/repoze.bfg/repoze/bfg/configuration.py,
 line 947, in add_view
  File 
 /Users/twillis/projects/cr-buttrcup/ext/repoze.bfg/repoze/bfg/configuration.py,
 line 275, in _derive_view
  File 
 /Users/twillis/projects/cr-buttrcup/ext/repoze.bfg/repoze/bfg/configuration.py,
 line 2364, in _map_view
  File 
 /Users/twillis/projects/cr-buttrcup/ext/repoze.bfg/repoze/bfg/configuration.py,
 line 2303, in requestonly
 TypeError: object of type 'NoneType' has no len()


 Any one run across this before?

 Thomas G. Willis

___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] repoze.bfg is now Pyramid

2010-11-05 Thread Thomas G. Willis
HOORAY!
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] bfg_alchemy template and handle_teardown

2010-04-29 Thread Thomas G. Willis
Agreed, I haven''t noticed any session wierdnessin any of my naive bfg
implementations either.



On Thu, Apr 29, 2010 at 10:20 AM, Laurence Rowe l...@lrowe.co.uk wrote:
 Hi,

 I'm trying to work out why the following code is in the bfg_alchemy
 template 
 (http://repoze.org/viewcvs/repoze.bfg/trunk/repoze/bfg/paster_templates/alchemy):

  subscriber for=repoze.bfg.interfaces.INewRequest
     handler=.run.handle_teardown
     /

 def handle_teardown(event):
    environ = event.request.environ
    if isActive(environ):
        t = transaction.get()
        after_end.register(DBSession.remove, t)

 As far as I know this is unnecessary. It's not in the repoze.cluegun
 app, nor in the app I worked on at Jarn. Are there any problems when
 you remove it?

 Laurence
 ___
 Repoze-dev mailing list
 Repoze-dev@lists.repoze.org
 http://lists.repoze.org/listinfo/repoze-dev




-- 
Thomas G. Willis
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] membership for BFG and composing multiple apps

2010-04-28 Thread Thomas G. Willis
I'll offer up this, NOT because I think you should use it, but it has
lots of examples of varying quality to give you ideas on how you might
compose auth/registration/password recorvery into an existing bfg app.

http://bitbucket.org/twillis/identity.model/src


You could use it, but I think you'll find you would rather write your own. :)


On Wed, Apr 28, 2010 at 3:10 PM, Chris Withers ch...@simplistix.co.uk wrote:
 Final one of my trio for this evening...

 Is there anything like the ol' CMFMembership for BFG?
 (important bits for me:
  - where to store/get user info from
  - cookie authentication
  - login and logout forms
  - password reminder and reset forms and functionality)

 If there is such a beastie, how do I plug it in to my existing app setup?

 If I wanted to write such a similar lump of non-app-specific
 functionality, how would I do so in such a way that plugging in the
 views and other code would be as easy as possible?
 (and also easy for the consumer to override my choice of html, specific
 url, etc)

 cheers,

 Chris - fun feeling like a total n00b again :-)

 --
 Simplistix - Content Management, Batch Processing  Python Consulting
            - http://www.simplistix.co.uk
 ___
 Repoze-dev mailing list
 Repoze-dev@lists.repoze.org
 http://lists.repoze.org/listinfo/repoze-dev




-- 
Thomas G. Willis
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] BFG PyCon BOF Summary

2010-02-23 Thread Thomas G. Willis
On Tue, Feb 23, 2010 at 10:11 AM, Andrey Popp 8may...@gmail.com wrote:
 On Tue, Feb 23, 2010 at 5:58 PM, Wichert Akkerman wich...@wiggy.net wrote:
 Thanks for the writeup!

 On 2/23/10 14:14 , Chris McDonough wrote:
 Documentation
 -

 - People would like to see a tutorial which hand-held people through
     the process of moving from a imperative configuration to a
     declarative configuration, and perhaps vice versa.

 Interesting - I would have expected the other direction to be more
 popular. Do you know why people seem to prefer declarative?

 From my expirience, many people become scared of using ZCML. Maybe
 this is because ZCML is XML... But for me declarative configuration is
 more preferable, cause it leads to less errors and better
 extensibility.
 ___
 Repoze-dev mailing list
 Repoze-dev@lists.repoze.org
 http://lists.repoze.org/listinfo/repoze-dev


Yeah zcml isn't the first thing you should show someone when they are
new to the bfg. I actually like how the bfg book puts it off (i think)
until around chapter 5 or 6 or so.

-- 
Thomas G. Willis
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] bfg sprint in hanover E

2010-02-22 Thread Thomas G. Willis
will there be a realtime feed of what's happening for those of us who
are interested, yet too lame to attend?

On Mon, Feb 22, 2010 at 9:30 AM, Chris McDonough chr...@plope.com wrote:
 For those who don't see the board in front and whom don't have twitter, we are
 in Hanover Room E for the BFG PyCon sprint today.

 --
 Chris McDonough
 Agendaless Consulting, Fredericksburg VA
 The repoze.bfg Web Application Framework Book: http://bfg.repoze.org/book
 ___
 Repoze-dev mailing list
 Repoze-dev@lists.repoze.org
 http://lists.repoze.org/listinfo/repoze-dev




-- 
Thomas G. Willis
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] repoze.bfg 1.1 final released

2009-11-16 Thread Thomas G. Willis
Thank you for this.

http://docs.repoze.org/bfg/1.1/whatsnew-1.1.html#ipython-support

I was actually trying to figure out how to get it to work a couple of weeks
ago. But my coding-fu was not up to the challenge.

Looks like a lot of new stuff to play with. I am the excited.
http://docs.repoze.org/bfg/1.1/whatsnew-1.1.html#ipython-support

On Sun, Nov 15, 2009 at 10:32 PM, Chris McDonough chr...@plope.com wrote:

 repoze.bfg 1.1 has been released.  You can install it via:

 easy_install -i http://dist.repoze.org/bfg/current/simple repoze.bfg

 Or via PyPI.

 The What's New In repoze.bfg 1.1 document details the changes made since
 the
 1.0 release:  http://docs.repoze.org/bfg/1.1/whatsnew-1.1.html

 The docs at http://docs.repoze.org/bfg/1.1 have been updated.

 The changelog from the prior 1.1b4 release follows:

 1.1 (2009-11-15)
 

 Internals
 -

 - Remove dead IRouteRequirement interface from ``repoze.bfg.zcml``
   module.

 Documentation
 -

 - Improve the Extending an Existing Application narrative chapter.

 - Add more sections to the Defending Design chapter.

 ___
 Repoze-dev mailing list
 Repoze-dev@lists.repoze.org
 http://lists.repoze.org/listinfo/repoze-dev




-- 
Thomas G. Willis
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] zope.schema, zope.formlib in bfg? or help a newb understand zca coolness

2009-10-03 Thread Thomas G. Willis
OK, not sure if this is a blasphemous question or not. I've been slowly
working through Web Component Development with Zope 3 , and instead of
trying out the things in zopeproject, I figured that trying out the things
in bfg as well may yield a greater understanding of what the heck is going
on. I realize that this may be incredibly dumb, so I'm not surprised that
I'm hitting roadblocks once in a while.

After reading up on zope.schema and zope.formlib, it seems that schema based
forms, fit my brain, and I would like to use them in bfg if possible rather
than tw.forms etc...



I got this far...


#models.py
#
...
class Record(Base):
__tablename__ = 'records'
id = Column(Integer, primary_key=True)
name = Column(Unicode(255), unique=True)
value = Column(Integer)

def __init__(self, name, value):
self.name = name
self.value = value

...

#views.py
#
...
from zope.interface import implements, Interface
from zope.schema import Text, Int
from zope.formlib.form import EditForm, Fields

class IRecord(Interface):
id = Int(
title = uThe id field,
description = ufield that holds the id,
required = True)

name = Text(
title = uThe name field,
description = uThe field that holds the name,
required = True)

value = Text(
title = uThe value field,
description = uThe field that holds the value,
required = True)

class RecordForm(EditForm):
form_fields = Fields(IRecord)
label = uEdit Record
...

#configure.zcml
#
...
  view
  for=.models.Record
  view=.views.RecordForm
  name=edit.html/
...

First run and accessing the page http://localhost:6543/1/edit.html I get an
expected error...

TypeError: ('Could not adapt', tst.models.Record object at 0x9fb0d4c,
InterfaceClass tst.views.IRecord)


Makes sense, I need to create an adapter, no biggie.


#views.py
#=

class RecordAdapter(object):
probably not the best way to do this...
def __init__(self, context):
self.context = context

def _get_id(self): return self.context.id
def _get_name(self): return self.context.name
def _get_value(self): return self.context.value

def _set_id(self,v): self.context.id = v
def _set_name(self,v): self.context.name = v
def _set_value(self,v): self.context.value = v

id = property(_get_id, _set_id)
name = property(_get_name, _set_name)
value = property(_get_value, _set_value)
...


and registered


#configure.zcml
#
...
  adapter
  factory=.views.RecordAdapter
  provides=.views.IRecord
  for=.models.Record/
...


Next run fingers crossed.

ComponentLookupError: ((zope.schema._bootstrapfields.Int object at
0xa690c6c, Request at 0xa69084c GET http://localhost:6543/1/edit.html),
InterfaceClass zope.app.form.interfaces.IInputWidget, u'')


Based on my limited understanding of zope, I am assuming that in my
configure.zcml I need to include a package,  maybe zope.app.form ?


#configure.zcml
#
...
  include package=repoze.bfg.includes/
  include package=zope.app.form/
...

next run results in not even getting the server running.

zope.configuration.xmlconfig.ZopeXMLConfigurationError: File
/home/twillis/projects/bfg/tst/tst/configure.zcml, line 5.2-5.36
IOError: [Errno 2] No such file or directory:
'/home/twillis/projects/bfg/lib/python2.6/site-packages/zope.app.form-3.8.1-py2.6.egg/zope/app/form/configure.zcml'


and indeed it doesn't exist. So all of this was done in a virtualenv and
easy_install. So finally here's my questions.


#1 does bfg provide machinery for registering components or is that
functionality specific to big daddy zope? I assume the answer is yes,
augmented  with it depends. I realize that bfg is meant to isolate you
from the zca, but darn it I think it's cool and I want to understand how
it's used. The above referenced book doesn't have any obvious section that
details how this works, at least not that I've found, so if anyone knows of
an online resource on how this works. I'd appreciate knowing about it.

#2 is the fact that an easy_install off zope.formlib results in no out of
the box zcml file to include (as far as I can tell) a result of these
particular zope libs not being refactored to be more standalone-ish? If so,
what would generally be the process of making it more standalone-ish. Would
it just be coming up with some configure.zcml to deploy with the package?


Hell If I knew all this already, I'd blog it. Because I'm sure there are
others out there interested in zope/repoze and might get intimidated by this
kind of thing.  :)


Anyway, thanks for reading, any information is appreciated.

-- 
Thomas G. Willis
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] zope.schema, zope.formlib in bfg? or help a newb understand zca coolness

2009-10-03 Thread Thomas G. Willis
:) I'll have to try this out too. That sounds like exactly what I'm looking
for.

On Sat, Oct 3, 2009 at 1:17 PM, Chris McDonough chr...@plope.com wrote:

 +1 to what Martin wrote, with something else that can only add to the
 confusion:  recently I have been using Formish (http://ish.io) to do
 autogenerated forms.  I think both zope.formlib and z3c.form try to paint
 forms
 based on model objects; formish doesn't even try.  It just lets you
 create
 your own form schema and attempts to draw forms based on that.  This is
 enough for my needs currently.

 - C


 Martin Aspeli wrote:
  Thomas G. Willis wrote:
  OK, not sure if this is a blasphemous question or not. I've been slowly
  working through Web Component Development with Zope 3 , and instead of
  trying out the things in zopeproject, I figured that trying out the
  things in bfg as well may yield a greater understanding of what the heck
  is going on. I realize that this may be incredibly dumb, so I'm not
  surprised that I'm hitting roadblocks once in a while.
 
  Bear in mind that whilst repoze.bfg uses a number of Zope packages, it
  is not built on top of Zope 3 (in the same way that, say, Grok is). BFG
  contains forks/re-implementations of some Zope things, omits a large
  number of package traditionally part of a Zope 3 bundle (this is a good
  thing!), and solves certain things differently (e.g. the way views are
  done in bfg is different from the way they are done in Zope).
 
  For this reason, Philipp's book will probably not apply in many cases if
  you're using BFG, and I don't think there's any documentation or good
  guides to *which* parts will apply and which parts won't (i.e. a bfg
  delta zope document).
 
  That said, I can't see it being impossible to use zope.schema + a forms
  library in repoze.bfg. Not that I've tried. ;)
 
  After reading up on zope.schema and zope.formlib, it seems that schema
  based forms, fit my brain, and I would like to use them in bfg if
  possible rather than tw.forms etc...
 
  This won't help with your specific question, but most people seem to be
  ditching zope.formlib in favour of z3c.form, which is more feature
  complete, better documented and better maintained. The basic principles
  are still the same: you build a schema and then create a form from that
  schema.
 
  http://docs.zope.org/z3c.form has the documentation.
 
  To use it, you need to depend on it in your own package's setup.py so
  that it gets installed, and include its configuration via include
  package=z3c.form / in your configure.zcml. To use the default widgets
  (which you probably want) you also need to mark the request with the
  IFormLayer marker interface. I'm not sure what facility repoze.bfg has
  for that, though.
 
  Martin
 

 ___
 Repoze-dev mailing list
 Repoze-dev@lists.repoze.org
 http://lists.repoze.org/listinfo/repoze-dev




-- 
Thomas G. Willis
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] zope.schema, zope.formlib in bfg? or help a newb understand zca coolness

2009-10-03 Thread Thomas G. Willis
I actually looked at this yesterday and it didn't seem to generate forms but
does provide the marshaling + validation. so it seems to me it's similar to
formencode/htmlfill, where I'm looking for something more like tw.forms.




On Sat, Oct 3, 2009 at 2:35 PM, Andreas Reuleaux reule...@web.de wrote:

 You might also want to look at Malte's repoze.formapi,
 see e. g. his blog entry


 http://mockit.blogspot.com/2009/05/forms-that-dont-make-you-tense-and.html

 Personally I can't comment on repoze.formapi vs. formish, as I have
 used neither of them yet, but I think both should work well with bfg,
 whereas z3c.form would require some porting effort.

 -Andreas


 On Sat, Oct 03, 2009 at 01:17:21PM -0400, Chris McDonough wrote:
  +1 to what Martin wrote, with something else that can only add to the
  confusion:  recently I have been using Formish (http://ish.io) to do
  autogenerated forms.  I think both zope.formlib and z3c.form try to paint
 forms
  based on model objects; formish doesn't even try.  It just lets you
 create
  your own form schema and attempts to draw forms based on that.  This is
  enough for my needs currently.
 
  - C
 
 
  Martin Aspeli wrote:
   Thomas G. Willis wrote:
   OK, not sure if this is a blasphemous question or not. I've been
 slowly
   working through Web Component Development with Zope 3 , and instead
 of
   trying out the things in zopeproject, I figured that trying out the
   things in bfg as well may yield a greater understanding of what the
 heck
   is going on. I realize that this may be incredibly dumb, so I'm not
   surprised that I'm hitting roadblocks once in a while.
  
   Bear in mind that whilst repoze.bfg uses a number of Zope packages, it
   is not built on top of Zope 3 (in the same way that, say, Grok is). BFG
   contains forks/re-implementations of some Zope things, omits a large
   number of package traditionally part of a Zope 3 bundle (this is a good
   thing!), and solves certain things differently (e.g. the way views are
   done in bfg is different from the way they are done in Zope).
  
   For this reason, Philipp's book will probably not apply in many cases
 if
   you're using BFG, and I don't think there's any documentation or good
   guides to *which* parts will apply and which parts won't (i.e. a bfg
   delta zope document).
  
   That said, I can't see it being impossible to use zope.schema + a forms
   library in repoze.bfg. Not that I've tried. ;)
  
   After reading up on zope.schema and zope.formlib, it seems that schema
   based forms, fit my brain, and I would like to use them in bfg if
   possible rather than tw.forms etc...
  
   This won't help with your specific question, but most people seem to be
   ditching zope.formlib in favour of z3c.form, which is more feature
   complete, better documented and better maintained. The basic principles
   are still the same: you build a schema and then create a form from that
   schema.
  
   http://docs.zope.org/z3c.form has the documentation.
  
   To use it, you need to depend on it in your own package's setup.py so
   that it gets installed, and include its configuration via include
   package=z3c.form / in your configure.zcml. To use the default
 widgets
   (which you probably want) you also need to mark the request with the
   IFormLayer marker interface. I'm not sure what facility repoze.bfg has
   for that, though.
  
   Martin
  
 
  ___
  Repoze-dev mailing list
  Repoze-dev@lists.repoze.org
  http://lists.repoze.org/listinfo/repoze-dev
 ___
 Repoze-dev mailing list
 Repoze-dev@lists.repoze.org
 http://lists.repoze.org/listinfo/repoze-dev




-- 
Thomas G. Willis
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] repoze.bfg and repoze.what

2009-09-29 Thread Thomas G. Willis
On Tue, Sep 29, 2009 at 3:32 PM, Rob Miller r...@burningman.com wrote:
 Thomas G. Willis wrote:

 Thanks for the response Chris,

 This makes perfect sense.  And honestly I'm not married to repoze.who
 or repoze.what,  To me it was the best option in pylons which is why I
 had it lying around.

 /purge from brain who+what

 just make sure you don't throw out the baby w/ the bathwater.  repoze.who
 works well w/ repoze.bfg, other folks (myself included) have used this
 combination w/o significant problems.  using repoze.what with repoze.bfg,
 however, is uncharted territory, probably best avoided unless you want to be
 the one to blaze that trail.

 -r

 ___
 Repoze-dev mailing list
 Repoze-dev@lists.repoze.org
 http://lists.repoze.org/listinfo/repoze-dev


Yeah I ended up getting repoze.who working relatively easily so I'm
going to keep it. The more that I think about it, I'm thinking
repoze.what is not that useful in a generic form since permissions
tend to be app specific(probably the same conclusion as others).

I think that the group/permission providers I wrote could still be
useful behind an authorization policy though.  So I may give that a
shot.

-- 
Thomas G. Willis
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] repoze.bfg and repoze.what

2009-09-26 Thread Thomas G. Willis
Hello, I'm a newb at this, and I tried my best to do the research but I'm
still confused.

I was wondering if anyone is aware of an example that shows how to link
repoze.what to an aclauthorzationpolicy .

I have some who/what plugin bits (WhoPlugin, GroupSource and
PermissionSource) I wrote that I would like to use, and preferably using an
ini file for configuring repoze.what.

There's a good chance I am missing something obvious, please be gentle.


Thanks in advance

-- 
Thomas G. Willis
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] repoze.bfg and repoze.what

2009-09-26 Thread Thomas G. Willis
On Sat, Sep 26, 2009 at 2:32 PM, Iain Duncan iaindun...@telus.net wrote:

 On Sat, 2009-09-26 at 11:58 -0400, Thomas G. Willis wrote:
  Hello, I'm a newb at this, and I tried my best to do the research but
  I'm still confused.
 
  I was wondering if anyone is aware of an example that shows how to
  link repoze.what to an aclauthorzationpolicy .
 
  I have some who/what plugin bits (WhoPlugin, GroupSource and
  PermissionSource) I wrote that I would like to use, and preferably
  using an ini file for configuring repoze.what.
 
  There's a good chance I am missing something obvious, please be
  gentle.

 Do you mean with bfg? I would love to see a bfg equivalent of Gustavo's
 repoze.what-pylons example app and quickstart. I think that would go a
 long way to increasing bfg adoption. BFG's roll-you-own nature makes
 great docs even more important and I think Chris et al have done a
 fantastic job in that regard, but I gotta admin I hit the wall when it
 came to repoze.who/what. The system is great, but there is a *lot* to
 digest to get it working.

 Iain



Yes with bfg. for example
http://docs.repoze.org/bfg/1.1/narr/security.html#repozewho1authenticationpolicy

gives the details for setting up a repoze.who authenticationpolicy
(though I think I could use the remote user one too)

but

repozewho1authenticationpolicy
 identifier_name=auth_tkt
 callback=.somemodule.somefunc
 /


but the callback arg doesn't make sense if you already have a
GroupSource and PermissionSource configured via repoze.what. But not
putting a callback in makes the policy assume the user belongs to no
groups. I think repoze.what ties permissions to groups, so if user
belongs to no groups then no permissions? Furthermore, I don't have a
callback to put there, it's all config driven.

As far as I could tell, repoze.what doesn't seem to provide a way to
get at the groups for the current request, but I could be wrong here.
But even if I could get the groups back, how would I wire in the
PermissionSource for acls?

I still feel like I'm missing something obvious. But I was hoping to
get this working because I rather like having the perms configured in
the zcml rather than in decorators/predicates on specific functions.

Other than that, thank you to those responsible for bfg. I'm really
digging it despite these little hurdles.



--
Thomas G. Willis
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev