How to know if current user has logged in from web or app?

Ruchika Thukral
Kilo Explorer

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?

2 REPLIES 2

Sulabh Garg
Mega Sage
Mega Sage

Hello Ruchika,

you can Disable attachments in mobile apps by using access control rules.

Procedure

  1. Navigate to System Security > Access Control (ACL).
  2. Filter the list for <Name> <contains> <sys_attachemt> and <Operation> <is> <read>.
  3. Find and open the record with the description: Allow read for records in sys_attachment, if the ACL script returns true.
  4. Clear the Admin overrides check box.
  5. In the Script field, add the following code to the bottom of the script:
    
    if( gs.isMobile() ){
         answer = false;
    }
  6. 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.
  7. Navigate to System Security > Access Control (ACL).
  8. Filter the list for <Name> <contains> <sys_attachemt> and <Operation> <is> <create>.
  9. Find and open the record with the description: Allow create for records in sys_attachment, if the ACL script returns true.
  10. Clear the Admin overrides check box.
  11. In the Script field, add the following code to the bottom of the script:
    
    if( gs.isMobile() ){
         answer = false;
    }
  12. 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

Maik Skoddow
Tera Patron
Tera Patron

Hi

you can check this at table sys_push_notif_app_install

find_real_file.png

Filter for user, current date on "Last Registered on" and "Active" = "true"

Kind regards
Maik