QPR Knowledge Base 2015.1

HasRights

HasRights

Previous topic Next topic No directory for this topic  

HasRights

Previous topic Next topic Topic directory requires JavaScript Mail us feedback on this topic!  

Revision history:

Introduced in QPR 7.2.1

 

Check if user has rights to given element

 

Synopsis:

 

SCModel.HasRights(ObjectId, UserName, Rights level, out riResult)

 

Parameters:

 

ObjectId: Integer

UserName: String. User's loginame or name of a group

Rights Level: Integer. If user has rights of this level or above, then 1 is returned in riResult parameter, otherwise 0

riResult: Integer. See previous parameter

 

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_USER_NOT_FOUND

RV_OBJECT_NOT_FOUND

 

Example Procedure:

 

iRet = oModel.HasRights(id, "John", 1, iResult) 'has at least view rights?