Open ergo opened 9 years ago
I think a tutorial, including an example app would be good. I am happy to write both the app and the tutorial, areas I think need covering.... (anyone else please add what you think we should cover).
Setting up the project Extending the mixins Elaborating on the RootFactory Adding in request.user to the pyramid app Adding and deleting users Assigning users to groups Adding permissions Assigning groups to permissions The login/logout routines, as well as how to customize Adding permission based access to views Providing an example view for approving a user account with the use of security code
EDIT: Add in example of adding an example get_session_callable in the models, so it can be returned as a function as required by the ini file:
ziggurat_foundations.session_provider_callable = yourapp.models.meta:get_session_callable
Also looking at the above assumes the user has a meta file and a folder for models, all other examples assume one model file, shall we provide this as well for the example?
Now fixed?
A lot better.
Might as well post my minor corrections in here, right? :-)
In "Cofiguring groupfinder and session factorys" (Typos in the header - "Configuring" and "factories") you have root_factory='intranet.models.RootFactory'
, but I guess that should be root_factory='<my_project>.models.RootFactory'
instead.
On "adding a resource that the user will own":
It would be useful to have a note that one must add __possible_permissions__
to the Resource-class in model containing a list of permission-names (e.g. "read")
permission.user_name = "foo"
does not work. Should that be permission.user_id = user.id
and permission.resource_id = resource.id
?
Documentation is lacking, contributions are welcome