Skip to content

Commit 3dbb108

Browse files
committed
doc: clarify adding ctx argument to check command in schema.py
On IRC user was unsure what file was used for the 1.51 - 1.60 upgrade section: Enhancement to check command for Permissions added file name desription and example. Also marked it as optional. Clarified that if or when it becomes required there will be a new required upgrade direction.
1 parent 94b5628 commit 3dbb108

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

doc/upgrading.txt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2885,12 +2885,13 @@ If you haven't modified you query.item.html template, simply copy the
28852885
query.item.html template from one of the above default templates to
28862886
your tracker's html directory.
28872887

2888-
Enhancement to check command for Permissions
2889-
--------------------------------------------
2890-
2888+
Enhancement to check command for Permissions (optional)
2889+
-------------------------------------------------------
28912890
A new form of check function is permitted in permission definitions.
2892-
The three argument form is still supported and will work the same
2893-
as it always has (although it may be depricated in the future).
2891+
An example check function is ``own_record(db, userid, itemid)`` in the
2892+
file schema.py. The three argument form is still supported and will
2893+
work the same as it always has (although it may be depricated in the
2894+
future).
28942895

28952896
If the check function is defined as::
28962897

@@ -2936,6 +2937,9 @@ parameter. This is expected to be the preferred form in the future.
29362937
You do not need to use the ``ctx`` parameter in the function if you do
29372938
not need it.
29382939

2940+
If the new four argument form is required in the future, there will be
2941+
required (not optional) directions on upgrading your schema.
2942+
29392943
Changes to property permissions
29402944
-------------------------------
29412945

0 commit comments

Comments
 (0)