QPR Knowledge Base

SetClassRights

Hide Navigation Pane

SetClassRights

Previous topic Next topic No expanding text in this topic  

SetClassRights

Previous topic Next topic JavaScript is required for expanding text Mail us feedback on this topic!  

Comments (...)

Revision history:

Introduced in QPR 7.2.1

Last changed in QPR 7.4.1

 

Set rights to an element type for a user or a group. Note that this function can set rights only to those elements for which the rights can be set in the user interface as well, i.e. to information items (-3), scorecards (-7), and to all default measure types as well as element types created by the user (positive integers).

 

Synopsis:

 

SCModel.SetClassRights(ElementTypeId, UserName, Rights)

 

Parameters:

 

ElementTypeId: Integer

UserName: String, can be a group name too

Rights: Integer: 0=None, 1=View, 2=Update, 3=Full

 

Required Rights:

 

Administrator or Model Administrator rights to the SCModel.

 

Return Values:

Below are listed the return values that this function can return:

 

RV_SUCCESS

RV_MODEL_NOT_OPEN

RV_NO_RIGHTS

RV_INVALID_ACCESSLEVEL

RV_INVALID_ELEMENT_TYPE

RV_USER_NOT_FOUND

RV_COULD_NOT_START_TRANSACTION

RV_UNKNOWN_ERROR

 

Example Procedure:

 

iRet = SCModel.SetClassRights(1, "John", 2) 'grant update rights to default measures

Comments (...)