I have a question about the aut_app CQL identifier. What is the exact use of this? I thought that it would list all assets from the app you specify, but it does not seem to do that.
When I do a request to /asset?app_id=2&limit=20&offset=0&hide_empty_assets=true&user_id=72291&cql=is_protected=false AND aut_app=="2" AND(videotimestamp > "2009-01-01 00:00:00" AND videotimestamp < "2010-03-08 14:50:00") sortby videotimestamp/sort.descending (this is the request I do directly on the mediamosa server) I expect to get all assets from client with the id 2, this is not the case. When doing the same request without aut_app=2 I get 107 assets, with aut_app==2 only 2. Is there a way to get all assets from a certain app of am I misusing this identifier?
Thanks
Comments
Re: CQL aut_app
Posted by Robert on March 8th, 2010 - 16:37Hello,
The aut_app is not intended to browse assets from other apps. Its intended to see which assets are master-slaved to that app.
Master-slave allows you to give access of your assets to another app. Once assets or mediafiles are masterslaved to another app, the other app gains read access to those assets. So aut_app allows you to see which assets or mediafiles are master-slaved of your app. Lets say you are app 2 and you have slaved some assets (of app 2) to app 3. Suppling aut_app == '3' will give back a list of all assets that are master-slaved to app 3.
So if you want to see assets from other apps in your query, you have to master-slave them first. This also means the other app must slave them to your app. Once slaved, you'll see these assets from the app automatically in your query result.
Its not possible to filter on apps, because your access is based on your app ID, meaning that even if your database is full with assets from 100 different apps, you still only see your assets unless they are master-slaved.
Re: CQL aut_app
Posted by kkeppens on March 11th, 2010 - 11:35I should have been more clear :-).
I have 3 apps, id's 2, 3 and 4 .
When I create an asset in app 2 I master-slave it to app 3 and 4. In the DB it appears as slave_id=2 / master_id=3 ( or 4 ) . ( Two entries for every object ) .
I do the same for assets in app 3 and 4 .
Now when I search on assets on client 2 with aut_app set to 3 I expect to get all assets from that app.
Am I assuming a correct workflow or am I doing something wrong?
Thanks
Re: CQL aut_app
Posted by Robert on March 11th, 2010 - 12:31I've been looking at the code that handles the aut_app. The aut_app currently only works when the master-slave is set on a mediafile and not on an asset. This master-slave on asset was added later, after the CQL aut_app was added. So that piece of code never been changed to support assets master-slave search.
I'll make a bug report on trac about it, referring to this posting to get it fixed.
See trac ticket;
http://mediamosa.org/trac/ticket/261
Thanks for your posting and effort.
Re: CQL aut_app
Posted by kkeppens on March 11th, 2010 - 12:52ok thanks