pyrocms/pyrocms — pull request #837 by wingdigby (2011-10-22 20:36:39+00:00)
Title: Permissions: allow restrictions and subpermission arrays based on specified db table. User helper allows restrictions and subpermissions.

Permissions allows array of sub-permissions (based on a db table like categories). User helper modified to allow this and also to allow restrictions.

permission: default is true for admin else false
restriction: default is false for admin else true

Applied example: Blog permissions:
restrict to own posts only: restrict_own
restrict to selected categories : array( name=> 'restrict_categories', table=>'categories', field=>'title')

Will post separate commit and pull request with Blog changes that do just this.

Comments and discussion sought. Ta.