Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Search PhotoCollection by ACL

$
0
0

Hi,

I am trying to get the list of PhotoCollections to which the logged in User has access to. There is a PhotoCollection named collection_1 which is created by the Admin and has got an ACL assigned to it which enables public access. User_1 is logged in to the application and trying to get the list of PhotoCollections to which he has access to. I am using the following search api:

function getPhotoCollection(){
    Cloud.PhotoCollections.search({
        user_id: '54d98a9bac454709744974a3', //Admin user_id
        acls: '54f0146908c91ea051126783'
    }, function(e){
        if (e.success){
            Titanium.API.debug("PHOTO COLLECTION SUCCESS !!");
            alert("Success: \n" + 
                "Count = " + e.collections.length);
            for (var i = 0; i < e.collections.length; i++) {
                var collection = e.collections[i];
                alert('Success:\n' +
                    'id: ' + collection.id + '\n' +
                    'name: ' + collection.name + '\n' +
                    'acl: ' + collection.acls);
           }
        }
        else alert('Error !!:\n' +
            ((e.error && e.message) || JSON.stringify(e)));
    });
}
This one returns all the PhotoCollections that Admin has created irrespective of the ACL.

Is there an api which returns something like getCollectionsByACLUser ? Please guide me.


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>