Liberator Auth API  7.1.33.251325-ac556235
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 Fri May 24 2024 16:30:46 for Liberator Auth API