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.

Hex Script versions < 1.2.0.1:
This function does not return a value
Hex Script versions >= 1.2.0.1:
This function returns false on error, and true on success.

Parameters:

Right:AddRight(iBitNumber)

This function adds the iBitNumber right.

Hex Script versions < 1.2.0.1:
This function does not return a value
Hex Script versions >= 1.2.0.1:
This function returns false on error, and true on success.

Parameters:

Right:RemoveRightByName(sRightName)

This function removes a right.

Hex Script versions < 1.2.0.1:
This function does not return a value
Hex Script versions >= 1.2.0.1:
This function returns false on error, and true on success.

Parameters:

Right:AddRightByName(sRightName)

This function adds a right.

Hex Script versions < 1.2.0.1:
This function does not return a value
Hex Script versions >= 1.2.0.1:
This function returns false on error, and true on success.

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 Sat Aug 22 21:09:31 2009 for Hex Script by  doxygen 1.5.8