Liberator Auth API  7.1.18.30557-d3f85b1
Content Based Permissioning

Functions

char * object_get_value (object_t *obj, int32_t fieldnum, char *buf, int len)
 The function returns the value of a specified field in an object. More...
 

Detailed Description

Content-based permissioning works by allowing users to see an object only if the object contains a certain value in one of its fields, as opposed to subject-based permissioning, which allows users to see an object based on the symbol name.

Example to illustrate content based permissioning

Function Documentation

char* object_get_value ( object_t obj,
int32_t  fieldnum,
char *  buf,
int  len 
)

The function returns the value of a specified field in an object.

Parameters
objThe RTTP object
fieldnumThe number of the field
bufBuffer to store the value
lenLength of the buffer
Return values
NULL- The field does not exist
buffer- buffer contains the field value

By calling object_get_value() in _authfuncs::auth_check_read(), you can find the value of a particular field. However, if working with an active source, it is possible that the value may be unavailable (i.e. object->type for the value is 200). In such circumstances, _authfuncs::auth_check_read() may return AUTH_AGAIN and _authfuncs::auth_check_read() will be called again when the first update is received.

Examples:
content.c.

Generated on Wed Feb 24 2021 18:29:19 for Liberator Auth API