couchapp

Is CouchDB per-user database approach feasible for users with lots of shared data?

孤者浪人 提交于 2019-12-14 03:40:05
问题 I want to implement a webapp - a feed that integrates data from various sources and displays them to users. A user should only be able to see the feed items that he has permissions to read (e.g. because they belong to a project that he is a member of). However, a feed item might (and will) be visible by many users. I'd really like to use CouchDB (mainly because of the cool _changes feed and map/reduce views). I was thinking about implementing the app as a pure couchapp, but I'm having trouble

Calling multiple views in CouchApp query

☆樱花仙子☆ 提交于 2019-12-11 11:59:31
问题 I need to search the CouchDB based on several criteria entered in a form. Name, an array of Tags and so on. I would then need various views to index on these fields. Ultimately, all the results will be collated in data.js and provided to mustache.html. Say there are 3 views - docsByName, docsByTags, docsById. What I don't know is, how to query all these views in query.js. Can this be done and how ? Or should the approach be of that to write one view that makes multiple emits for each search

Simple CouchDB + jQuery mobile app loads list fine in desktop browsers, just not mobile

一世执手 提交于 2019-12-10 11:13:37
问题 I'm trying to write my first Couchapp with jQuery mobile. In every desktop browser I tested (IE/FF/Chrome/Safari), the app functions exactly as intended. But when I try the same page in any mobile browser (Mobile Safari, Atomic, Android, Opera), the listview fails to populate. At first I thought this might have to do with the mobile browsers handling my $("#terms").listview( "refresh" ); call differently, but changing that didn't help. I have verified that the view I am using works correctly:

Advanced permissions with couchdb

空扰寡人 提交于 2019-12-08 17:20:45
问题 We have a couchapp application with multiple users and a complex system of permissions. Our models are of two kinds: Foo and bar. Users have admin access to their own Foo and Bar, and can be given permission to see, change and delete other people's Foo and bar. Example: User Sabrina has these models: Foo { _id: 1 } Foo { _id: 2 } Bar { _id:1 } Bar { _id:2 } Of course the real models are larger documents. She wants to give Giulia read access to her Foos, and read and write access to her first

Getting url for an attachment

风流意气都作罢 提交于 2019-12-06 02:56:34
问题 I'm using CouchApp to build an easy web application that allows to upload and manage pictures. The actual image file is stored as attachment to the doc like show below. { "_id":"09fe82d75a26f9aa5e722d6b220180d2", "_rev":"2-5797b822c83b9d41545139caa592f611", "data":"some additional fields with info about the image", "_attachments": { "foo.jpg": { "stub":true, "content_type":"image/jpeg", "length":23721 } } } But for integrating the image in html i need the url to the attachment. How do i get

how to get jquery.couch.app.js to work with IE8

烂漫一生 提交于 2019-12-05 11:00:16
I have tested this on Windows XP SP3 in IE7 and IE8 ( in all compatibility modes ) and Windows 7 Ultimate in IE8 (in all compatiblity modes) and it fails the same way on both. I am running the latest HEAD from the the couchapp repository. This works fine on my OSX 10.6.3 development machine. I have tested with Chrome 4.1.249.1064 (45376) and Firefox 3.6 on Windows 7 Ultimate and they both work fine. As do both Safari 4 and Firefox 3.6 on OSX 10.6.3 Here is the error message Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0

How does a user login to a couchapp that has a reader role defined?

ぐ巨炮叔叔 提交于 2019-12-05 02:07:06
问题 I deployed my application via Couchapp, which means that the whole application is being served out of the database. I don't want the data in the Couchdb database to publicly available, so I specified a reader role that a user must have before I server him data. When I go to the application, however, all I can get is: {"error":"unauthorized","reason":"You are not authorized to access this db."} Because it can't even serve up the login page that uses jquery.couch.js. Any ideas on how to provide

CouchDB: This database failed to load / No DB shards could be opened (logged in as admin)

醉酒当歌 提交于 2019-12-04 17:45:33
I am trying to regain access to my databases stored in CouchDB, but the error This database failed to load. gets shown instead of the databases (see attachments). I started seeing all of these errors at once It be some user rights misconfiguration (1. The error This database failed to load. is normal, when lacking privileges, 2. The actions to delete or replicate a DB are missing). However, I am logged as admin. Can you help me find the root cause of the error? Simple PUT and DELETE requests curl -X PUT http://admin:somepassword@127.0.0.1:5984/testdb : [error] 2018-02-09T15:06:05.221393Z

Is CouchDB per-user database approach feasible for users with lots of shared data?

天涯浪子 提交于 2019-12-04 01:21:06
I want to implement a webapp - a feed that integrates data from various sources and displays them to users. A user should only be able to see the feed items that he has permissions to read (e.g. because they belong to a project that he is a member of). However, a feed item might (and will) be visible by many users. I'd really like to use CouchDB (mainly because of the cool _changes feed and map/reduce views). I was thinking about implementing the app as a pure couchapp, but I'm having trouble with the permissions model. AFAIK, there are no per-document permissions in CouchDB and this is

CouchApp without Server side or CouchDB backend with xdomain issues?

谁都会走 提交于 2019-12-03 08:46:12
问题 I have been playing with CouchDB and CouchApp for a little while now. I am planning on using it for a new web site project I'm working on. From a scalability viewpoint I love the idea of CouchApp. The downside is that with no server side code there are some things (like oAuth authentication) that are hard to do on the client side. At some point I'm sure I will need some server side code of some description - I guess you can then look at Node.js but would rather not at this point. Using