Changes between Version 67 and Version 68 of BluePrintAuthorization


Ignore:
Timestamp:
06/20/10 08:38:31 (11 years ago)
Author:
Fran Boon
Comment:

Backward compatibility: record vs record_id is optional

Legend:

Unmodified
Added
Removed
Modified
  • BluePrintAuthorization

    v67 v68  
    150150 * For single records modify {{{shn_has_permission()}}} (called from {{{shn_create()}}}, {{{shn_delete()}}}, {{{shn_read()}}} & {{{shn_update()}}}, but also available for other functions)
    151151  * Where possible, we merge this with the reading of the record to have a single DAL hit instead of 1 for the permissions check & another for the actual read by modifying the calling functions appropriately:
    152    * {{{modules/sahana.py}}} defines a new SQLFORM2() class which takes a record instead of a record_id
    153    * {{{CrudS3}}} modifies {{{Crud.create()}}} to take a record instead of a record_id & calls {{{SQLFORM2()}}}
    154    * {{{CrudS3}}} modifies {{{Crud.update()}}} to take a record instead of a record_id & calls {{{SQLFORM2()}}}
     152   * {{{modules/sahana.py}}} defines a new {{{SQLFORM2()}}} class which takes a record as an option to a record_id
     153    * {{{if type(record) == gluon.sql.Row:}}}
     154   * {{{CrudS3}}} modifies {{{Crud.create()}}} to take a record as an option to a record_id & calls {{{SQLFORM2()}}}
     155   * {{{CrudS3}}} modifies {{{Crud.update()}}} to take a record as an option to a record_id & calls {{{SQLFORM2()}}}
    155156{{{
    156157def shn_has_permission(name, tablename, record_id = 0):