How to know if current user has logged in from web or app?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2022 02:39 AM
We want to display attachments on incidents form mandatory only for web users and not mobile app users. Is there a method to determine if a user has logged on through web or app?
Labels:
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2022 02:46 AM
Hello Ruchika,
you can Disable attachments in mobile apps by using access control rules.
Procedure
- Navigate to System Security > Access Control (ACL).
- Filter the list for <Name> <contains> <sys_attachemt> and <Operation> <is> <read>.
- Find and open the record with the description: Allow read for records in sys_attachment, if the ACL script returns true.
- Clear the Admin overrides check box.
- In the Script field, add the following code to the bottom of the script:
if( gs.isMobile() ){ answer = false; }
- Click Update.
The added code prevents attachments from appearing when the instance is accessed from a mobile device. If you want to prevent your users from uploading attachments, continue on to the next steps.
- Navigate to System Security > Access Control (ACL).
- Filter the list for <Name> <contains> <sys_attachemt> and <Operation> <is> <create>.
- Find and open the record with the description: Allow create for records in sys_attachment, if the ACL script returns true.
- Clear the Admin overrides check box.
- In the Script field, add the following code to the bottom of the script:
if( gs.isMobile() ){ answer = false; }
- Click Update.
The added code prevents attachments uploading when the instance is accessed from a mobile device.Note: The ability to rename or delete existing attachments on records in mobile is determined by the access control list (ACL) rules on your instance. For more information on these rule and how the effect user permissions on your instance, see Access control list rules.
Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg
Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg
Regards
Sulabh Garg
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2022 04:34 AM