Check current thread user's rights to object specified by RootObjectType string

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(
	string sObject
)
Visual Basic
Public Shared Function Right ( _
	sObject As String _
) As Integer
Visual C++
public:
static int Right(
	String^ sObject
)

Parameters

sObject
Type: System..::..String
string representation of RootObjectTypes object

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("Object.Client")<(int)SecurityLevelTypes.ReadOnly)
    c=Client.GetItem(myID);
else
    MessageBox.Show("You don't have sufficient rights to open a client - Bazinga!"); //;)

See Also