- Code: Select all Expand viewCollapse view
Sub onloadpersoneelsdossier
if checkpermissionspersoneelsdossier = "false" then
'thisComponent.CurrentController.Frame.close( true )
thisComponent.CurrentController.Frame.dispose()
exit sub
end if
end Sub
function checkpermissionspersoneelsdossier as string
Dim oForm, oCtrl, oState, oCtrl2, oField, naam
oForm=ThisComponent.Drawpage.Forms.getByName("MainForm")
If GetGuiType = 1 Then
naam = Environ( "USERNAME" ) ' Windows
ElseIf GetGuiType = 4 Then
naam = Environ( "USER" ) ' Unix, Linux
Else
MsgBox "Unknown operating system!", 16
' Mac OS => GetGuiType = 3
End If
msgbox("sluiten")
'if naam<>"Bas" then
checkpermissionspersoneelsdossier="false"
'end if
end function
I suppose this is an error in OOO2.4.1, I've run into somthing similar before. Does anyone have an idea how to accomplish the permissions system per form? Of course, I could just offer the forms and set the permissions on my mysql-database per table (I should do that anyway to prevent other users from reading the data through the tables) but I also want to protect the forms.