couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavan Kumar <>
Subject hidden fields in a document
Date Sun, 20 Jun 2010 05:01:33 GMT
Hi ,

  I have a need where certain fields in a document shouldn't seen while
responding for GET document API's. For e.g the document store's certain
fields which are internal to the application not to be seen by end user. The
same is for design documents where i don't want the users to see my
views,filters,validate_doc_update code. Similar to treating  _id and _rev as
special fields, can we have double underscore fields which is special, e.g
"__internalId". These fields are accessible to all view,shows etc but not
for direct json out. In design documents we could change the name of view
field to "__views". Let only "admin" role uses only access these fields.

 There must be surely a better way to achieve the same need ?

 To avoid exposing out internal details we could place an intermediary app
layer, but just was thinking if this could be useful to have feature like
this in couchdb itself.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message