Changes between Version 69 and Version 70 of RESTController
- Timestamp:
- 08/07/11 17:16:41 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RESTController
v69 v70 194 194 """Handy function for restricting access to certain methods """ 195 195 session.error = T("Restricted method") 196 redirect(URL( r=request))196 redirect(URL(f="index")) 197 197 198 198 # Note the s3xrc.model.set_method usage below. … … 200 200 " RESTlike CRUD controller for inbox" 201 201 person = db(db.pr_person.uuid == auth.user.person_uuid).select(db.pr_person.id) 202 response.s3.fil er = (db.msg_inbox.person_id == person[0].id)203 s3 xrc.model.set_method(module, "inbox", method="create", action = restricted_method)204 return s hn_rest_controller(module, "inbox", listadd=False, editable = False)202 response.s3.filter = (db.msg_inbox.person_id == person[0].id) 203 s3mgr.model.set_method(module, "inbox", method="create", action = restricted_method) 204 return s3_rest_controller(module, "inbox", listadd=False, editable = False) 205 205 206 206 }}} … … 221 221 ---- 222 222 DeveloperGuidelines 223 DeveloperGuidelines