comparison test/db_test_base.py @ 8119:c12377fb4144 permission-performance

Change permission representation Now permissions are checked in different order. Permissions without a check method (which are cheap to check) are checked first. Only if no permission is found do we check permissions with check methods.
author Ralf Schlatterbeck <rsc@runtux.com>
date Fri, 18 Oct 2024 16:52:42 +0200
parents a9b136565838
children aa5ae3f84889
comparison
equal deleted inserted replaced
8118:c88ad93f0e77 8119:c12377fb4144
3322 expected = [ 'New Web users get the Role "User"\n', 3322 expected = [ 'New Web users get the Role "User"\n',
3323 'New Email users get the Role "User"\n', 3323 'New Email users get the Role "User"\n',
3324 'Role "admin":\n', 3324 'Role "admin":\n',
3325 ' User may create everything (Create)\n', 3325 ' User may create everything (Create)\n',
3326 ' User may edit everything (Edit)\n', 3326 ' User may edit everything (Edit)\n',
3327 ' User may use the email interface (Email Access)\n',
3328 ' User may access the rest interface (Rest Access)\n',
3327 ' User may restore everything (Restore)\n', 3329 ' User may restore everything (Restore)\n',
3328 ' User may retire everything (Retire)\n', 3330 ' User may retire everything (Retire)\n',
3329 ' User may view everything (View)\n', 3331 ' User may view everything (View)\n',
3330 ' User may access the web interface (Web Access)\n', 3332 ' User may access the web interface (Web Access)\n',
3331 ' User may access the rest interface (Rest Access)\n', 3333 ' User may manipulate user Roles through the web (Web Roles)\n',
3332 ' User may access the xmlrpc interface (Xmlrpc Access)\n', 3334 ' User may access the xmlrpc interface (Xmlrpc Access)\n',
3333 ' User may manipulate user Roles through the web (Web Roles)\n',
3334 ' User may use the email interface (Email Access)\n',
3335 'Role "anonymous":\n', 'Role "user":\n', 3335 'Role "anonymous":\n', 'Role "user":\n',
3336 ' User is allowed to access msg (View for "msg" only)\n', 3336 ' User is allowed to access msg (View for "msg" only)\n',
3337 ' Prevent users from seeing roles (View for "user": [\'username\', \'supervisor\', \'assignable\'] only)\n'] 3337 ' Prevent users from seeing roles (View for "user": [\'username\', \'supervisor\', \'assignable\'] only)\n']
3338 3338
3339 self.assertEqual(soutput, expected) 3339 self.assertEqual(soutput, expected)

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