ergo / ziggurat_foundations

Framework agnostic set of sqlalchemy classes that make building applications that require permissions an easy task.
BSD 3-Clause "New" or "Revised" License
71 stars 22 forks source link

Update get_user.py #41

Closed tdamsma closed 8 years ago

tdamsma commented 8 years ago

use request.unauthenticated_userid, instead of from pyramid.security import unauthenticated_userid

ergo commented 8 years ago

@tdamsma thanks for the PR, but I'm worried I might break some older pyramid applications, this property on request appeared in pyramid 1.5, on other hand 1.5 is over 2 years old so it should be fine, any thoughts?

Maybe you could wrap it in a helper that would import from other location if its not found on request?

tdamsma commented 8 years ago

I guess the question then is, what version of pyramid do you want to support. I could't find any version requirements in the code.

ergo commented 8 years ago

I think it should work from version 1.0 or 1.2 - don't remember exactly. We could make it 1.4 minimal though.

tdamsma commented 8 years ago

Would be good to make whichever version you decide as minimum explicit. I believe you could do that by adding somthing like extras_require={'pyramid':'pyramid>=1.4'} to setup.py

ergo commented 8 years ago

Merging this, thank you. @tdamsma Please add yourself to the authors file.