Notifications

14 views

Description

Product documentation for SG Mobile app specifies that, by creating ACLs on the aya_attachment table, we can restrict users from adding attachments.

Disabling attachments on a mobile device:
Use an ACL to block specific access on mobile. Use the isMobile method to check if a request comes from a mobile device. For example, you could add an ACL for the attachment [sys_attachment] table where the read and write scripted ACLs includes the following check. You can also add this code to any existing ACLs you have for the attachment table. If have multiple attachment ACLs, all of the need to have Admin override option unchecked.
if( gs.isMobile() ){
answer = false;
}

However, this does not help in case of Agent mobile app for Android devices. On iPhone, the attachment icon is hidden, Android still shows it.

Steps to Reproduce

1. Login an Android device.

2. Check for the create ACLs on sys_attachment table. There are 2 OOB ACLs.

3. Add the condition to return false for non admin users if the device is mobile. For instance, in one of the create ACLs you need to write a script like this:

if( gs.isMobile()){
answer = false;
}
else{
answer = getSCAttachmentCreateAnswer();
}

function getSCAttachmentCreateAnswer() {
if (current.table_name == 'sc_cart_item')
return true;
return false;
}

4. Follow a similar approach for the other ACLs as well.

5. Go to agent app as a non admin user and check if you can add attachments to a record or not. Observe the non-admin user can attach.

Workaround

This problem is fixed in all currently supported releases.

The pre-New York workaround was to go to the System Properties table, search for the "glide.ui.m_agents" property, and append at the end the string the value ",android".

For example: "iphone,android_phone,IEMobile,Windows Phone,iPod,Windows CE,BlackBerry,BB10,android".


Related Problem: PRB1352263

Seen In

There is no data to report.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-07-19 06:46:33
Published:2020-07-19