Constructor
new Grant(app, grant)
- Description:
Constructor
Parameters:
Name | Type | Description |
---|---|---|
app |
Simplicite.Ajax | Ajax services |
grant |
Object | User rights meta-data |
Methods
T(code, plural)
- Description:
Get text alias (constraint usage)
Parameters:
Name | Type | Description |
---|---|---|
code |
string | text code |
plural |
boolean | look for the plural label |
accessCreate(name)
- Description:
Can create object
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Simplicite.Ajax.BusinessObject | object or name |
accessDelete(name)
- Description:
Can delete object
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Simplicite.Ajax.BusinessObject | object or name |
accessObject(name)
- Description:
Can access/read object
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Simplicite.Ajax.BusinessObject | object or name |
accessUpdate(name)
- Description:
Can update object
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Simplicite.Ajax.BusinessObject | object or name |
checkAccess(name, prop)
- Description:
Check access to object
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Simplicite.Ajax.BusinessObject | object or name |
prop |
string | optional property to check 'c'=create 'u'=update 'd'=delete 'i'=indexable |
getDataMapObject(obj)
- Description:
Get datamap object wrapper
Parameters:
Name | Type | Description |
---|---|---|
obj |
string | object name |
getEmail()
- Description:
Get user email
getFirstName()
- Description:
Get user first name
getFullName()
- Description:
Get user full name
getHomeObject(obj)
- Description:
Get home object wrapper
Parameters:
Name | Type | Description |
---|---|---|
obj |
string | object name |
getIndexFilteredObjects()
- Description:
Get filtered objects on index search
getLang()
- Description:
Get user language
getLastName()
- Description:
Get user last name
getLogin()
- Description:
Get user login
getMainObject(obj)
- Description:
Get main object wrapper
Parameters:
Name | Type | Description |
---|---|---|
obj |
string | object name |
getMergeObject(obj)
- Description:
Get merge wrapper
Parameters:
Name | Type | Description |
---|---|---|
obj |
string | object name |
getMergePanelObject(obj, fk)
- Description:
Get merge panel wrapper
Parameters:
Name | Type | Description |
---|---|---|
obj |
string | object name |
fk |
string | optional foreign-key name |
getObject(inst, name)
- Description:
Get object wrapper
Parameters:
Name | Type | Description |
---|---|---|
inst |
string | instance name |
name |
string | object name |
getPanelObject(obj, fk)
- Description:
Get panel wrapper
Parameters:
Name | Type | Description |
---|---|---|
obj |
string | object name |
fk |
string | optional foreign-key name |
getParameter(callback, name, params)
- Description:
Get a session parameter
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | Optional callback (returns a promise if absent) |
name |
string | Parameter name |
params |
Object | Optional parameters (see Simplicite.Ajax.getSysParam) |
getRefObject(obj)
- Description:
Get reference object wrapper
Parameters:
Name | Type | Description |
---|---|---|
obj |
string | object name |
getText(code, plural)
- Description:
Get text alias (constraint usage)
Parameters:
Name | Type | Description |
---|---|---|
code |
string | text code |
plural |
boolean | look for the plural label |
getTmpObject(obj)
- Description:
Get temporary object wrapper
Parameters:
Name | Type | Description |
---|---|---|
obj |
string | object name |
getUIObjectClass(name)
- Description:
JS class for UI usage
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Object name |
getUserID()
- Description:
Get user ID
hasResponsibility(group)
- Description:
Check if user has responsibility on specified group
Parameters:
Name | Type | Description |
---|---|---|
group |
string | Group name |
isAdmin()
- Description:
Is user an ADMIN ?
objectLabel(name)
- Description:
Get object label
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Simplicite.Ajax.BusinessObject | object or name |
setIndexFilteredObjects()
- Description:
Get filtered objects on index search
setParameter(callback, name, value, params)
- Description:
Set a session parameter
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | Optional callback (returns a promise if absent) |
name |
string | Parameter name |
value |
string | Parameter value |
params |
Object | Optional parameters (see Simplicite.Ajax.setSysParam) |
setUIObjectClass(name, js)
- Description:
JS class for UI usage
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Object name |
js |
string | Class script |