Restrict users to form use only

Discuss the database features
Post Reply
goltoof
Posts: 29
Joined: Sat Oct 26, 2013 1:13 pm

Restrict users to form use only

Post by goltoof »

I'm trying to make user experience with OOBase as dummy proof as possible. My form is ready for them to use, it's connecting to an external db source and works perfectly.

Here's what I would like to change:
  • Hide the Tasks Pane.
    Prevent users from accessing the Tables, Queries and reports Icons in the Database pane, or hide those icons completely.
    Prevent users from editing/deleting/renaming the Form.
    If possible, have them open the form directly without even seeing the OOBase application.
Basically, users shouldn't see any options whatsoever to modify the form, database or see anything whatsoever that doesn't involve basic usage of the form itself.
OpenOffice 4, Windows 7
RPG
Volunteer
Posts: 2261
Joined: Tue Apr 14, 2009 7:15 pm
Location: Netherlands

Re: Restrict users to form use only

Post by RPG »

Hello

Make stand alone forms. Standalone forms are normal writer or calc documents.

Romke
LibreOffice 24.8.5.2 on openSUSE Leap 15.6
Nocton
Volunteer
Posts: 533
Joined: Fri Nov 05, 2010 10:27 am
Location: UK

Re: Restrict users to form use only

Post by Nocton »

A quick fix is to run as a Shell from a Windows script file. Put the following in a file such as START.vbs. Alter the database name to yours. With nChoose=0 your database tables and application will not be visible.

Code: Select all

Dim sFileName, sTitle, nChoose
' /////// NOTE: Edit variables in this section ///////
'
sFileName = "MyDatabase.odb"
sTitle = "Run Batch Silent"
nChoose= 0 	'1 =show database, 0 = not show
'
' /////// NOTE: Edit variables in this section ///////

Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oShell = CreateObject("WScript.Shell")

If Not oFSO.FileExists(sFileName) Then
	oShell.Popup sFileName & "  -  run file not found", 10, sTitle, vbCritical + vbSystemModal
	Wscript.Quit 1
End If

' run the batch file with quotes added
iRC = oShell.Run("""" & sFileName & """", nChoose, True)

' Return batch file error level when exiting script
Wscript.Quit iRC
Such a script file is also useful for preliminary work such as copying stuff from one folder to another, e.g. I use one to copy from Dropbox to a working folder before running the application.

Regards

Nocton
OpenOffice 4.1.12 on Windows 10
goltoof
Posts: 29
Joined: Sat Oct 26, 2013 1:13 pm

Re: Restrict users to form use only

Post by goltoof »

Nocton wrote:A quick fix is to run as a Shell from a Windows script file.

That looks promising but it makes no difference to how Base opens. I swapped out sFileName with my odb and running the script just opens it normally. I'm not quite familiar with vbs scripts or if I followed you correctly. What I'm mainly after is having them open the form contained in Base while hiding Base/base db pane.
OpenOffice 4, Windows 7
goltoof
Posts: 29
Joined: Sat Oct 26, 2013 1:13 pm

Re: Restrict users to form use only

Post by goltoof »

RPG wrote: Make stand alone forms. Standalone forms are normal writer or calc documents.
Romke
It doesn't appear to be so straight forward. The form I created is connected to a centralized db. I have base connected but I'm not sure how to set up OO to recognize it as a data source to use in writer.
viewtopic.php?t=40493

On step (6) select a Data Source (all I have is Bibliography). I try registering a database but there is not file for me to select, the Database type is MySQL JDBC connection.
Last edited by goltoof on Wed Jun 11, 2014 12:16 am, edited 1 time in total.
OpenOffice 4, Windows 7
RPG
Volunteer
Posts: 2261
Joined: Tue Apr 14, 2009 7:15 pm
Location: Netherlands

Re: Restrict users to form use only

Post by RPG »

Hello

probably yes

Romke
LibreOffice 24.8.5.2 on openSUSE Leap 15.6
goltoof
Posts: 29
Joined: Sat Oct 26, 2013 1:13 pm

Re: Restrict users to form use only

Post by goltoof »

It worked! I just needed to select the Base odb as the data source. Seems a little redundant having two files but that'll do.
OpenOffice 4, Windows 7
RPG
Volunteer
Posts: 2261
Joined: Tue Apr 14, 2009 7:15 pm
Location: Netherlands

Re: Restrict users to form use only

Post by RPG »

Hello

Once you have a registered database you can use the data out of the database use in nearly all document inside OOo. Not only in forms but also as tables.

Romke
LibreOffice 24.8.5.2 on openSUSE Leap 15.6
goltoof
Posts: 29
Joined: Sat Oct 26, 2013 1:13 pm

Re: Restrict users to form use only

Post by goltoof »

I got the standalone form working, even a switchboard. I would like it to open without all of the default toolbars that open in writer. I could just hide the toolbars but then I'd have to reshow them when working with other documents. Is there a way to choose what toolbars/buttons show when opening a standalone form?
OpenOffice 4, Windows 7
Nocton
Volunteer
Posts: 533
Joined: Fri Nov 05, 2010 10:27 am
Location: UK

Re: Restrict users to form use only

Post by Nocton »

but it makes no difference to how Base opens.
This is rather odd, with me and on all the PCs I've tried it on, with nChoose =0 the Base/base db pane does not show, only the first form/menu/switchboard from which all the other forms and reports can be accessed. I presume that you have not opened OO first? If so, don't - let the script do it.

Regards

Nocton
OpenOffice 4.1.12 on Windows 10
Post Reply