Michał Nowacki

ACL and layout

Discussion created by Michał Nowacki on Mar 15, 2017
Latest reply on Mar 15, 2017 by gkhanlarov

I am not sure, but I think that it can be a bug. I noticed that if my custom ACL does not allow to delete record, the mobile aplication shows delete button. On the other hand Sugar base does not display delete button for the record.

I see, when I click edit record, system does request. 

Response:

{
   "id":"50e797d7-d9bf-c8a3-9e39-589ddbf6a867",
   "name":"OBC: Wprowadzenie",
   "date_modified":"2017-02-10T16:24:07+01:00",
   "description":"Administrator (2017-02-10 16:23 - 2017-02-10 16:23): TYLUY,GY,TY,TY,G",


   [...]


   "_acl":{
      "delete":"no",
      "massupdate":"no",
      "fields":{
         "name":{
            "write":"no",
            "create":"no"
         },
         "description":{
            "write":"no",
            "create":"no"
         },
         "date_start":{
            "write":"no",
            "create":"no"
         },
         "date_end":{
            "write":"no",
            "create":"no"
         },
         "status":{
            "write":"no",
            "create":"no"
         },
         "direction":{
            "write":"no",
            "create":"no"
         },
         "repeat_type":{
            "write":"no",
            "create":"no"
         },
         "assigned_user_id":{
            "write":"no",
            "create":"no"
         },
         "assigned_user_name":{
            "write":"no",
            "create":"no"
         },
         "call_subject":{
            "write":"no",
            "create":"no"
         }
      }
   },
   "contact_name":"db",
   "_module":"Calls"
}

JS function called hasAccess does not interprete the _acl object from response.

Outcomes