Right class

The Right class represents a users rights.
Hex.Right(iUserId) returns a new object of type Right.
For more information about how to create an instance of this object read Hex.Right(iUserId) section.

The rights system is hexhub is based on wich bits are set in a 64 bit number.
If you know nothing about the binary system, you should use the *ByName functions.
For more information about what rights exist in hexhub read the hexhub documentation.

Right:CheckRight(iBitNumber)

This function returns true if the iBitNumber is set, otherwise it returns false.
Parameters:

Right:CheckRightByName(sRightName)

This function returns true if the has the right checked, otherwise it returns false.
Parameters:

Right:RemoveRight(iBitNumber)

This function removes the iBitNumber right.
This function does not return a value.

Parameters:

Right:AddRight(iBitNumber)

This function adds the iBitNumber right.
This function does not return a value.
Parameters:

Right:RemoveRightByName(sRightName)

This function removes a right.
This function does not return a value.

Parameters:

Right:AddRightByName(sRightName)

This function adds a right.
This function does not return a value.

Parameters:

Lua code sample: Checking for a right

local rights = Hex.Right(iUserId)
local bResult = rights:CheckRightByName("connect0")
if (bResult == true) then
	-- user got the right					
end

Lua code sample: Removing and adding a right

local rights = Hex.Right(iUserId)
rights:RemoveRightByName("connect0")
rights:AddRightByName("connect0")

Generated on Thu Aug 21 11:24:07 2008 for HeXHub/HexScript by  doxygen 1.5.4
Site hosted by SourceForge.net Logo