Jump to content
Server Maintenance This Week. ×

Disable Import in Web Direct


This topic is 1113 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I don't want users Importing data directly.

It's easy to disable Import in FileMaker Pro by removing the menu item, but this is not possible in Web Direct. Changing the Available Menu Commands for the user works, but then disables Export as well, which isn't good.

Is there any way to disable Import in Web Direct? This seems to be configured in jwpc.jar, but there's no way to remove it.

Link to comment
Share on other sites

  • 8 months later...

I've made some progress on this.

Take a copy of jwpc.jar in FileMaker Server\Web Publishing\publishing-engine\jwpc-tomcat\fmi\WEB-INF\lib and rename it to jwpc.zip. Unzip the contents.

In the archive are the following xml files, which can be edited to remove the Import Records (or any other) menu item:

com\filemaker\jwpc\iwp\ui\statusarea\menubar\main-menu.xml

        <menuitem name="IMPORT_RECORDS">
            <menuitem name="FILE_DOT" />
        </menuitem>
        <separator />

com\filemaker\jwpc\iwp\ui\statusarea\menubar\menu.xml

        <menuitem name="IMPORT_RECORDS">
            <menuitem name="FILE_DOT" />
        </menuitem>

Update the files in jwpc.jar (taking a backup first) and restart FileMaker Server and you should be good to go.

 

Unfortunately this doesn't work - and causes WebDirect to fail to start. Any ideas on why this is? I'm assuming there's a CRC check on jwpc.jar or some other issue.

Link to comment
Share on other sites

A few points you should be aware of:

1. If you don't want users to do something, you should take away their privilege to do so in their privilege set. Removing a menu item means only that they do not have a convenient way to perform the action.

2. Filemaker programmers thought that if a user has the privilege to create records, they should be also allowed to create them by importing.

3. A user without a privilege to create records can still do so if you provide them with a scripted method and set the script to run with full access. (Conversely, a user without access to the export menu item could still export via a script.)

 

Link to comment
Share on other sites

5 hours ago, comment said:

A few points you should be aware of:

1. If you don't want users to do something, you should take away their privilege to do so in their privilege set. Removing a menu item means only that they do not have a convenient way to perform the action.

2. Filemaker programmers thought that if a user has the privilege to create records, they should be also allowed to create them by importing.

3. A user without a privilege to create records can still do so if you provide them with a scripted method and set the script to run with full access. (Conversely, a user without access to the export menu item could still export via a script.)

 

I don't think that's strictly correct. For example I may allow users to delete records, but I don't want them to use the 'delete all' menu item and possibly delete thousands of records at once.

As it happens I generally restrict record creation/deletion to my scripts (and therefore check the validity of the action within the db) as per your third point, but as users can edit records they can perform an import and update many records at once. This will have unintended consequences and probably cause some data corruption. I do not want them to be unable to edit records, but want them to be unable to do so via an import.

Therefore I think it's still valid to be able to remove this menu item in WebDirect.

Edited by jaboda
Typo
Link to comment
Share on other sites

2 hours ago, jaboda said:

I may allow users to delete records, but I don't want them to use the 'delete all' menu item and possibly delete thousands of records at once.

Well, you are saying exactly what I said: if you allow them to delete records, they still can delete thousands of records. The may even find a way to delete thousands of records at once. All that you have denied them is a convenient way to delete thousands of records at once. 

I am not saying that's not a legitimate goal. But it needs to be clear what the goal is. Your title says "Disable import", but (IIUC) you merely want to make import inaccessible from the menu. That's a completely different thing.

IMHO, since custom menus are not available in WD, your best option would be to do what you said in the original post:

On 7/17/2020 at 1:50 PM, jaboda said:

Changing the Available Menu Commands for the user works, but then disables Export as well, which isn't good.

and allow them to export through a script.


You also might find this interesting: 
https://philosophyoffilemaker.com/fielmaker-vs-web-88

Link to comment
Share on other sites

This topic is 1113 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.