_setAppPermissions
Sets the application permissions of the specified User, controlling what they can do on the mobile application.
Parameters
id
The ID of the User.
val
The permission value as a bit field. Possible values are defined below. Multiple permissions are set by adding together their respective permission values.
Customers Section: Set to 1 to enable the User to access the customer section. Job Lock: Set to 2 to prevent the User from creating new appointments. Quick Complete: Set to 4 to enable the User to skip setting advanced options such as Mileage, Time Spent, Send PDF, Schedule New Appointment, etc. Customer List: Set to 8 to download the full customer database to the application instead of prioritising customers associated with the User (for their jobs, tasks, etc.). Be warned that this may slow the login process. Dropbox: Set to 16 to enable Dropbox integration, allowing the User to upload photos and videos to a Dropbox account. Archives: Set to 32 to download jobs as archives. Be warned that this may slow the login process if the User's account has a large number of jobs. Job Rejection: Set to 64 to prevent the User from rejecting jobs. Job Change User: Set to 128 to prevent the User from reassigning jobs to other users. Edit Customer on Job Page: Set to 256 to prevent the User from editing customers of the Job Overview page. Assets Section: Set to 512 to prevent the User from accessing the Assets section.
Example
This example sets the properties for Customers Section, Job Lock and Archives. FM_api('User_setAppPermissions', ['id' => '123', 'val' => '35']);
Results
On Success
On Failure
If the User is not logged in: {'error':'not logged in'}
Last updated