ACL permission problem

+1 vote
Hi, App42 teams:
    My app is an ACL enable app, and I set the permission as public/read.
      1. I want to all the user can read/write some public document/record, 
          i.e.  I create 200 public record, I expect every user can fetch one record and delete the record. But I has set the app permission as public/read, so i don't have the permission to delete the record which i fetch.
      2. A insert a document/record, I expect B can write this record.
     Can you give me some advice, thanks for your reply!
asked Jun 2, 2014 in App42 Cloud API-BaaS by wuqiudongonmyway (30 points)

1 Answer

0 votes

Hi ,

There will be two cases for giving access to users for edit & delete record/documents.

First, when you are inserting the json document into No-SQL Storage Service you can set the default permission of read/write for users so that users can edit and delete the document.

Please find the code snipped below for set the default permission :-

HashSet<ACL> aclList = new HashSet<ACL>();
aclList.add(new ACL("PUBLIC", Permission.READ));
aclList.add(new ACL("PUBLIC", Permission.WRITE));

Second, set permission to your existing docs using grantAccessOnDomethod.

In which you can add read/write to public or a specfic user so that users can edit & delete.

HashSet<ACL> aclSet = new HashSet<ACL>();
aclSet.add(new ACL("PUBLIC", Permission.READ));

aclSet.add(new ACL("PUBLIC", Permission.WRITE));

answered Jun 2, 2014 by hs00105 (517 points)
edited Jun 2, 2014 by hs00105
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on