diff CHANGES.txt @ 5186:36630a062fb5

Check in enhanced form for check command used by addPermission. New form can include a **context dictionary that allows access to the name of the property, class, and permission being checked. This should make designing more complex permission requirements easier.
author John Rouillard <rouilj@ieee.org>
date Fri, 17 Feb 2017 21:18:34 -0500
parents 349bef975367
children 4955963fa670
line wrap: on
line diff
--- a/CHANGES.txt	Fri Feb 17 19:44:15 2017 -0500
+++ b/CHANGES.txt	Fri Feb 17 21:18:34 2017 -0500
@@ -167,6 +167,15 @@
   usually be the same template used to edit the form. See the section
   on "Implementing Modal Editing Using @template" in
   ``customizing.txt``. (John Rouillard)
+- New form of check function is permitted in permission definitions.
+  If the check function is defined as:
+      check(db, userid, itemid, **ctx)
+  the ctx variable will have:
+     ctx['property'] the name of the property being checked or None
+     ctx['classname'] the class that is being checked or None
+     ctx['permission'] the name of the permission (e.g. View, Edit)
+  At some future date the older 3 argument style check command will
+  be deprecated. See ``upgrading.txt`` for details.
 
 Fixed:
 

Roundup Issue Tracker: http://roundup-tracker.org/