Jump to content
stefangs

Custom menus and access privileges

Recommended Posts

Hi all,

In my solution, I have scripted most functions so that the standard menu commands are not needed, or rather, shouldn't be used. As such, I have created a custom menu set that removes all commands that aren't necessary.

But now I can go in and select the Standard FileMaker commands from the Tools menu to bring up a standard menu set anyway. Is that just because I have FMA rather FMP and does that mean anyone with FMA can change to the default menus as well?

I thought the menu set would somehow be tied to the privilege set, but there doesn't seem to be a way to select one.

What am I missing here?

Thanks,

Share this post


Link to post
Share on other sites

You can do it because you're logged in with full access.  Your users wouldn't be (hopefully) so they would get the custom menu you assign.

Share this post


Link to post
Share on other sites

I see, so there's no connection between a custom menu set and a particular set of access privileges. That explains it, then.

Thanks!

Share this post


Link to post
Share on other sites

You can specify a default menu set for the file, in the custom menus dialog, and you can specify a default menu set for each layout. Other than that, you would control custom menu loading via scripts, where you can check a user's privileges and assign a menu set accordingly. But as Wim noted, you can't lock a full access user out of the Tools menu.

Share this post


Link to post
Share on other sites

Just thinking... I have a global variable 'debug' in my files that, when set to 1,  does or does not a bunch of things while I develop. I can then just reset this to 0 to see how the file behaves to a normal user. I would be great to have the custom menu set look at this variable and when it's 1 it would always install the standard menu set.

I find it distracting to have FM always revert to the custom menu set while developing. Is there some other way to prohibit this?

Share this post


Link to post
Share on other sites

In your OnOpen script, detect whether you are logged in with Full Access and use the "install menu set" for the default menu set and toggle the option to use as file default.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks, Wim! That did it.

 

Edited by stefangs
tested

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

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