goodwill: I would just grab that code from pyramid_celery and load up the whole app instead of doing bootstrap
oops
I get goodwill and gavinc confused sometimes
gavinc
So do we
goodwill
sontek: I hug more ... thats how you can tell us apart
otherwise we are identical
Loetkolben has quit
bduncan_ is now known as bduncan
marplatense has quit
tilgovi has quit
marplatense joined the channel
garbas joined the channel
moo-_- has quit
Loetkolben joined the channel
moo-_- joined the channel
teix has quit
MGiberius34 joined the channel
frispete_ has quit
frispete_ joined the channel
faddai joined the channel
whit has quit
faddai has quit
dack has quit
yleclanche joined the channel
thomi joined the channel
inbells has quit
whit joined the channel
Adniel has quit
jpenny
gavinc: just curious -- have you looked at crossbar.io 's WAMP server?
inbells joined the channel
jstoiko_ joined the channel
jstoiko_
does anyone have experience w/ object-level acls in pyramid?
tilgovi joined the channel
chrisrossi
that would be the standard case, so, yes, probably lots of people.
jstoiko_
sorry let me rephrase my question
say I have a collection of "stories", I need the creator of any given "story" to be able to give access to its "story" to all users that have "user.group"="xyz"
user can decide whether to give read or write access
chrisrossi
and what's the question?
jstoiko_
what is the best solution to achieve that with pyramid?
the only part that pyramid cares about is after the access has been granted, how does that object turn the grant into an __acl__
and so you need to define an __acl__ and put some code in there that returns the right thing... the right thing would be dependent on how you are persisting the access info
jstoiko_
any way to store that in the DB?
chrisrossi
yeah.
you could have an __acl__ column
raydeo
of course, but that's up to you how you do that :-)
chrisrossi
or you could make __acl__ a property that generates an acl from other data in the database...
wiggy joined the channel
jstoiko_
I see
blaflamme
look at raydeo auth demo ;)
wiggy has quit
raydeo
you need to define Store.__acl__ so it returns that list
maybe we are talking about
class Story(object):
chrisrossi
as long as the context has an __acl__ for pyramid to examine, you're golden.
raydeo
@property
def __acl__(self):
# do some queries and return a list of access for this story
blaflamme
you can use a route factory for this
chrisrossi
this assumes, of course, that the Story object is already the context for the request.
jstoiko_
then, i also need to query the db by __acl__, e.g. give me all stories that current user can read
raydeo
for doing lists like that the __acl__ is less ideal
Loetkolben has quit
you'll want to store the data in a way that you can query easily for both cases... __acl__ may not be that form
jstoiko_
maybe convert to JSON?
raydeo
json is not so queryable
jstoiko_
it is in my case (ElasticSearch)
raydeo
well that's up to you of course
I think in terms of database tables since we said DB :-)
Adniel joined the channel
jstoiko_
I just simplified for example sake :)
Loetkolben joined the channel
raydeo
well the only part pyramid cares about is the acl on the context... the rest is up to you
jstoiko_
but even if a DB, hstore in postgres is queryable and mongodb doesnt care
thanks @raydeo
raydeo
mongodb isn't a db, but yes there are ways to make it queryable ;-)
chrisrossi
i think you have enough knowledge to make something that will work. go forth and rock some code.
jstoiko_
also thank you @chrisrossi and @blaflamme
blaflamme
jstoiko_: you're welcome... how's the poster in the office :P
jstoiko_
not yet up but looking great on the table :)
blaflamme
o_O... OMG!
chrstphrhrt joined the channel
supton joined the channel
gavinc
jpenny: at some point calling /status every 3 seconds for ever user with an open tab will be a bad idea, but it isn't yet ;)
jpenny
ok. I don't really have anything in production with it yet, but, it looks very nice for this kind of use-case.
Palmik joined the channel
As long as you ignore their web server ;-)
Loetkolben has quit
yleclanche has quit
otter768 joined the channel
antons joined the channel
otter768 has quit
antons has quit
laarmen joined the channel
hagen has quit
antons joined the channel
erasmas has quit
j_bennet joined the channel
erasmas joined the channel
MGiberius34 has quit
j_bennet
dear Pyramid experts, can anyone tell me if there's a way to retrieve full information about cookies from the Request object (not the Response)? The request.cookies dictionary seems to only give me access to name: value mapping.
hvelarde_ joined the channel
bkuberek_ joined the channel
raydeo
j_bennet: dunno what you know about cookies but that's all the browser sends back
you can look at the raw request via your browser debugger or any other tool... that's all you get
j_bennet
raydeo: this comes from HTTP_COOKIE env variable, right?
raydeo
well it's from the Cookie header which is called HTTP_COOKIE in the wsgi environ
bkuberek has quit
bkuberek_ has quit
j_bennet
raydeo: i see... so there's no way to recreate the cookies fully?
raydeo
what info are you hoping for?
expiration date and stuff? that's info for the browser to use to determine when to send back the name-value mapping
it's not sent back to you ever
gavinc
the timing info for cookies is NOT sent with the cookies to the server, it's brower local
for VERY VERY good reasons :D
j_bennet
i see... yes, path, domain, expiration date, that's the info I'm looking for