Changes between Version 34 and Version 35 of S3/S3AAA


Ignore:
Timestamp:
01/18/11 00:53:58 (11 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/S3AAA

    v34 v35  
    165165    - "update": update existing records in this table (or this particular record, if specified)
    166166    - "delete": delete records from this table (or this particular record, if specified)
    167 === s3_accessible_query ===
     167=== Query for Accessible Records ===
     168
     169You can build a query for all records in a table which are accessible for the current user with a certain method, by using {{{auth.s3_accessible_query}}}:
     170
     171{{{
     172# Define your query:
     173query = ...
     174
     175# Get accessible-query (e.g., all readable record in db.my_table):
     176accessible = auth.s3.accessible_query("read", db.my_table)
     177
     178# Combine both parts:
     179query = accessible & query
     180
     181# Perform the query
     182rows = db(query).select(...)
     183}}}
    168184
    169185=== Handling Insufficient Permissions ===