comparison doc/design.txt @ 8416:370689471a08 issue2550923_computed_property

merge from default branch accumulated changes since Nov 2023
author John Rouillard <rouilj@ieee.org>
date Sun, 17 Aug 2025 16:12:25 -0400
parents 7b6615fb37fc
children
comparison
equal deleted inserted replaced
7693:78585199552a 8416:370689471a08
6 6
7 ======================================================== 7 ========================================================
8 Roundup - An Issue-Tracking System for Knowledge Workers 8 Roundup - An Issue-Tracking System for Knowledge Workers
9 ======================================================== 9 ========================================================
10 10
11 :Authors: Ka-Ping Yee (original), Richard Jones (implementation) 11 :Authors: Ka-Ping Yee (original_), Richard Jones (implementation)
12
13 .. _original: spec.html
12 14
13 Contents 15 Contents
14 16
15 .. contents:: 17 .. contents::
16 :local: 18 :local:
1520 - name 1522 - name
1521 - description 1523 - description
1522 - klass (optional) 1524 - klass (optional)
1523 - properties (optional) 1525 - properties (optional)
1524 - check function (optional) 1526 - check function (optional)
1527 - filter function (optional)
1525 1528
1526 The klass may be unset, indicating that this permission is 1529 The klass may be unset, indicating that this permission is
1527 not locked to a particular hyperdb class. There may be 1530 not locked to a particular hyperdb class. There may be
1528 multiple Permissions for the same name for different 1531 multiple Permissions for the same name for different
1529 classes. 1532 classes.
1532 properties only. 1535 properties only.
1533 1536
1534 If check function is set, permission is granted only when 1537 If check function is set, permission is granted only when
1535 the function returns value interpreted as boolean true. 1538 the function returns value interpreted as boolean true.
1536 The function is called with arguments db, userid, itemid. 1539 The function is called with arguments db, userid, itemid.
1540
1541 A filter function complements a check function: It is used
1542 when searching for viewable items. The filter function
1543 allows to filter in SQL rather than calling the check
1544 function for each item after a query. It must return a list
1545 of dictionaries containing parameters for the hyperdb.Class.filter
1546 method. An empty list indicates no access. The signature of
1547 the filter function is::
1548
1549 def filter(db, userid, klass):
1537 ''' 1550 '''
1538 1551
1539 class Role: 1552 class Role:
1540 ''' Defines a Role with the attributes 1553 ''' Defines a Role with the attributes
1541 - name 1554 - name

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