couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wordit Ltd <wordi...@googlemail.com>
Subject Allowing specific field value updates only
Date Tue, 16 Nov 2010 17:30:10 GMT
Can anybody think of a way to allow _user to decrease a field value,
but not increase it?
Increments would only be allowed to _admin. I can only think to
compare the new value with the old one and see if it is greater or
less.

Would that work in a validation function, and is it secure?

I'm trying keep as many update actions to the client-side. If I let
admin do all the updates then I have to use an Ajax call to the
server.

Marcus

Mime
View raw message