{"action":"created","issue":{"url":"https://api.github.com/repos/ergo/ziggurat_foundations/issues/30","labels_url":"https://api.github.com/repos/ergo/ziggurat_foundations/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/ergo/ziggurat_foundations/issues/30/comments","events_url":"https://api.github.com/repos/ergo/ziggurat_foundations/issues/30/events","html_url":"https://github.com/ergo/ziggurat_foundations/issues/30","id":122113717,"number":30,"title":"[support] Vanilla Pyramid project - how to \"get_db_session\", RootFactory acl not working out of the box","user":{"login":"peletiah","id":36299,"avatar_url":"https://avatars.githubusercontent.com/u/36299?v=3","gravatar_id":"","url":"https://api.github.com/users/peletiah","html_url":"https://github.com/peletiah","followers_url":"https://api.github.com/users/peletiah/followers","following_url":"https://api.github.com/users/peletiah/following{/other_user}","gists_url":"https://api.github.com/users/peletiah/gists{/gist_id}","starred_url":"https://api.github.com/users/peletiah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peletiah/subscriptions","organizations_url":"https://api.github.com/users/peletiah/orgs","repos_url":"https://api.github.com/users/peletiah/repos","events_url":"https://api.github.com/users/peletiah/events{/privacy}","received_events_url":"https://api.github.com/users/peletiah/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-14T19:33:05Z","updated_at":"2015-12-15T11:07:13Z","closed_at":"2015-12-15T00:39:30Z","body":"I'm having trouble following the configuration and usage guide. Is it ok to ask for support here?\r\n\r\nI've setup a Pyramid project with SQLAlchemy-scaffold and added all the configuration-changes as described in the docs.\r\n\r\nFirst thing I'm running into is an issue with get_db_session: \r\n\r\n#### Getting DBSession\r\nIn my models.py ```DBSession``` is defined as\r\n\r\n    DBSession = scoped_session(sessionmaker(extension=ZopeTransactionExtension()))\r\n\r\nThis is the alchemy-scaffold default. Shouldn't ```ziggurat_foundations.models.base.get_db_session``` be able to find ```myapp.models.DBSession```?\r\nSince that didn't work for me, I can make basic login work with the other two approaches that are pointed out in the docs (\"get_session_callable\" and \"ziggurat_foundations.models.DBSession = DBSession\"). But should it work without these definitions?\r\n\r\n#### Permissions not working as expected\r\nThe second issue is the view-permission. Clearly my users permissions are added to the RootFactory's acl:\r\n\r\n```\r\nlog.debug(self.__acl__)\r\n2015-12-14 19:36:30,202 DEBUG [pyramid_ziggurat_auth_demo.models:102][waitress] [('Allow', 'system.Authenticated', u'view'), ('Allow', u'editor', u'edit'), ('Allow', u'editor', u'delete')]\r\n```\r\n\r\nbut it is not honored when I try to access a view with a permission (E.g. I have a  [\"edit_note\"-view](https://github.com/peletiah/ziggurat_auth_demo/blob/master/pyramid_ziggurat_auth_demo/views.py) with an \"edit\"-permission which should be accessible when user \"editor\" is logged in).\r\n\r\nWhen I switch the permission to \"view\", it works for authenticated users (As expected) - but not the dynamic permission in the acl.\r\n\r\nWhat am I missing?\r\n\r\nI've uploaded the full code I'm using to https://github.com/peletiah/ziggurat_auth_demo (incl. DB-dump)\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ergo/ziggurat_foundations/issues/comments/164730431","html_url":"https://github.com/ergo/ziggurat_foundations/issues/30#issuecomment-164730431","issue_url":"https://api.github.com/repos/ergo/ziggurat_foundations/issues/30","id":164730431,"user":{"login":"peletiah","id":36299,"avatar_url":"https://avatars.githubusercontent.com/u/36299?v=3","gravatar_id":"","url":"https://api.github.com/users/peletiah","html_url":"https://github.com/peletiah","followers_url":"https://api.github.com/users/peletiah/followers","following_url":"https://api.github.com/users/peletiah/following{/other_user}","gists_url":"https://api.github.com/users/peletiah/gists{/gist_id}","starred_url":"https://api.github.com/users/peletiah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peletiah/subscriptions","organizations_url":"https://api.github.com/users/peletiah/orgs","repos_url":"https://api.github.com/users/peletiah/repos","events_url":"https://api.github.com/users/peletiah/events{/privacy}","received_events_url":"https://api.github.com/users/peletiah/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T11:07:13Z","updated_at":"2015-12-15T11:07:13Z","body":">I will be releasing a separate scaffold \r\n\r\nGreat, looking forward to it!\r\n\r\nThanks for the quick fix regarding permissions and docs!\r\n\r\nI'll try to figure out resources and implement them in my demo.\r\n\r\n"}}