IRoleAddFunctionRight Method |
Add a function right to the active list. Use the function right id or the function right key-name (like 'admin-users')
Namespace:
SuperOffice.COM.SuperOfficeDB
Assembly:
SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntaxvoid AddFunctionRight(
IListTextItem functionRight
)
Sub AddFunctionRight (
functionRight As IListTextItem
)
Dim instance As IRole
Dim functionRight As IListTextItem
instance.AddFunctionRight(functionRight)
void AddFunctionRight(
[InAttribute] IListTextItem^ functionRight
)
Parameters
- functionRight
- Type: SuperOffice.COM.SuperOfficeDBIListTextItem
IListTextItem - Value from functionright table
ExamplesAdd function right
Dim db As New Database
If db.Login("<username>", "<password>") Then
Dim role As SORole = db.Admin.CreateRole(EnAssocRoleType.enRoleTypeEmployee, Nothing)
role.Name = "the new role"
role.Description = "this is the new role"
role.Save()
Dim allrights As IListTextItems = db.Admin.GetAllFunctionRights(EnAssocRoleType.enRoleTypeEmployee)
Dim fr As IListTextItem = allrights(3)
role.AddFunctionRight(fr)
role.Save()
Else
MsgBox("failed to log in")
End If
See Also