Check current thread user's rights to Root object type specified

Namespace: GZTW.AyaNova.BLL
Assembly: GZTW.AyaNova.BLL (in GZTW.AyaNova.BLL.dll) Version: 7.0.0.0 (7.0.0.0)

Syntax

C#
public static int Right(
	RootObjectTypes RootObject
)
Visual Basic
Public Shared Function Right ( _
	RootObject As RootObjectTypes _
) As Integer
Visual C++
public:
static int Right(
	RootObjectTypes RootObject
)

Parameters

RootObject
Type: GZTW.AyaNova.BLL..::..RootObjectTypes
RootObjectTypes object type

Return Value

int value corresponding to SecurityLevelTypes enum

Examples

Example usage - Checking if the currently logged in user has sufficient rights to access a Client object:
CopyC#
Client c=null;
if(AyaBizUtils.Right(RootObjectTypes.Client)<(int)SecurityLevelTypes.ReadOnly)
    c=Client.GetItem(myID);
else
    MessageBox.Show("You don't have sufficient rights to open a client - Bazinga!"); //;)

See Also