
leeasling wrote...
Sham - anyway you would be able to verify this? I'm still seeing that JCR permissions are not be recognized by this in AEM 6.
Program looks ok and AssetManager is respecting JCR permissions as you can see [1] when i used session of user who did not had permission. The only problem in your code is whether success or failure you are displaying uploaded fine. Handle exception correctly & check the acl in your useradmin especially for the group user belongs to.
[1]
21.08.2014 11:44:31.022 *ERROR* [0:0:0:0:0:0:0:1%0 [1408635871017] POST /bin/submitFile HTTP/1.1] com.day.cq.dam.api.AssetManager createAsset: asset error while creating asset [/content/dam/test/test.txt]:
com.adobe.granite.asset.api.AssetException: Failed to create Asset at path [ /content/dam/test/test.txt ]
at com.adobe.granite.asset.core.impl.AssetManagerImpl.createAsset(AssetManagerImpl.java:69)
at com.day.cq.dam.core.impl.AssetManagerImpl.createAsset(AssetManagerImpl.java:252)
at com.test.services.osgi.servlets.TestServlet.writeToDam(TestServlet.java:67)
at com.test.services.osgi.servlets.TestServlet.doPost(TestServlet.java:48)