diff share/roundup/templates/minimal/schema.py @ 8231:984bc9f94ec6

chore: format schema.pys in templates so ruff is ok. Also makes comparing them easier.
author John Rouillard <rouilj@ieee.org>
date Sat, 21 Dec 2024 15:23:12 -0500
parents c087ad45bf4d
children
line wrap: on
line diff
--- a/share/roundup/templates/minimal/schema.py	Thu Dec 19 17:58:10 2024 -0500
+++ b/share/roundup/templates/minimal/schema.py	Sat Dec 21 15:23:12 2024 -0500
@@ -34,15 +34,18 @@
 
 # May users view other user information?
 # Comment these lines out if you don't want them to
-p = db.security.addPermission(name='View', klass='user', 
+p = db.security.addPermission(name='View', klass='user',
     properties=('id', 'username'))
 db.security.addPermissionToRole('User', p)
 
+
 # Users should be able to edit their own details -- this permission is
 # limited to only the situation where the Viewed or Edited item is their own.
 def own_record(db, userid, itemid):
     '''Determine whether the userid matches the item being accessed.'''
     return userid == itemid
+
+
 p = db.security.addPermission(name='View', klass='user', check=own_record,
     description="User is allowed to view their own user details")
 db.security.addPermissionToRole('User', p)

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