Functions related to Security

f-cando

The function is used to check a string value against two types of a comma-separated lists. This function compares the input strings against the list of current userid (userid for the current user, xuser.xusec) or its usergroup (xugroup.xgroc). If there is a match between the two values then functions return ‘true’ otherwise ‘false’. Therefore, this function is used for security purpose on the basis of currently logged in user and its usergroup. Userid comparision against the list is not case sensitive.

ReturnType: Logical

AppliesTo: Data

Used as
f-cando (‘xuser.xusec, inkoop’) returns true if the input string, lies in the list of userid (xuser.xusec) or its usergroup (xugroup.xgroc), for currently logged in user.

Values to use for ID lists

Value Meaning
* All users have access
User This user has access
!user This user does not have access
String* Users whose Ids begin with stringhave access
!string* Users whose Ids begin with string do not have access

f-can-do

This function is very similar to the function f-cando. In addition to comparing strings against list, it also allows us to use security in the field of special table for a specified program. We can also apply security in certain modes such as create, update and copy.

ReturnType: Logical

AppliesTo: Data

Used as
This function is used as f-can-do (‘Inkoop, c-is, inpureq, inadn’,’i/inpum.p’,’inadn’,?).

Example

if f-can-do('inkoop,c-is,inpureq,inadn','i/inpum.p','inadn',?) = yes then p-attribute = p-attribute + min(p-attribute,chr(1)) + 'inadn' + chr(1) +'sensitive' + chr(1) + 'false'.

Result
If the currently logged on user falls in the list of supplied userid or usergroup as input parameter then widget ‘inadn’ of program ‘ i/inpum.p’ becomes sensitive false.

Input Parameters

ParametersData Type Description
v-candolist CharacterList of comma-separated values with userid, usergroup. Rules, table name, field name for specified program name can also be input.
v-xproc Character Program name
v-ids Character v-ids can contain the following value: xwidget|0x00056fe1|[ext]|xprog|0x00004561by removing [ext]| from this string all that remains is a string of tables with their rowid’s
v-mode Character Ø CreateØ Copy
Ø Update
If not mode then ‘0’

f-calculate

This function replaces the rules with the condition stored in the xrules record.

ReturnType: Character

AppliesTo: Data

Used as
This function is used as f-calculate (‘#rulecode’).

Input parameters

Parameters Data Type Description
v-prep Character Condition

results matching ""

    No results matching ""