Get a list of all the permissions existing in the system database.
Permissions have package and name. Basically each module has a basic permission called module that applies to general using the module (ex.: ems/module).
Other permissions are for special features (Ex.: ems/sendMailing).
CRM has not a module permission but has 2 different permission types: crm/allClients and crm/assignedClients. These permissions allow the usage of the CRM module.
the difference between them is that crm/assignedClients allows to see only the data related to assigned clients, even if the module functionality is accessible.
Permissions are read and write. Write means also edit, add, delete.
If the permission is execution of a task, like sending emails, write means execute (send) while read allows only to see if it was executed.
crm/allClients - right to see / edit all clients
crm/assignedClients - right to see / edit clients assigned to the logged in user (With this difference between crm/allclients and crm/assignedclients we will keep
crm/sendOneEmail - right to send emails to single users
ems/module - right to read/write email newsletter but not to change a status of a newsletter (can not start sending emails using the different newsletter types)
ems/sendMailing - send bulk emails in the CRM, change status of a newsletter (activate)
billing/module
commission/module
settings/module
company/module - right for email templates, pdf templates, company notifications etc
statistics/module
tools/module - rights related to webpage connectors
Arguments
Assign a permission to a user
In order to avoid confusion between the logged in user and the user who's permissions will be changed, we use "employee_id" in this case
@params: read_acces and write_access can be 0 (no) or 1 (yes)
Notice: user permissions are necessary ONLY for the permissions that a user doesn't inherit from the groups where he is in (like sales, accounting etc)
Arguments
employee_id |
integer, required |
permission_id |
integer, required |
read_access |
integer, required |
write_access |
integer, required |
Revoke a permission of a user
In order to avoid confusion between the logged in user and the user who's permissions will be changed, we use "employee_id" in this case
Arguments
employee_id |
integer, required |
permission_id |
integer, required |
Give/update user permissions
@param id = user id
@param permission Ex.: ?id=3&permissions[crm/access]=r&permissions[ems/access]=w&permissions[system/settings]=x
i = inherit. The permissions will be taken from the departments. This should be the default setting
r = readonly
w = read & write
x = no access (explicit)
Arguments
id |
integer, required |
permissions |
array, required |
Check if a login is available
Arguments
Change login / password for a client/company
required: id
required: login
required: passwd
Arguments
id |
integer, required |
login |
string, required |
passwd |
string, required |
Change password for a client/company
required: id
required: passwd
Arguments
id |
integer, required |
passwd |
string, required |
Get all records with pagination.
The function accepts limit and has a maximum limit that can not be overwritten
@return
Data Table object
Arguments
Get one record based on id
Arguments
Get Change Log for an object
Arguments