Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Testing for layout access within a script

Featured Replies

So, with an update to our database systems also comes an update to our security.

Some of our databases have data that is accessible by everyone, while also having data that is only accessible to a few. The protected data is always on a seperate layout, and that layout is protected by the user privileges. That's fine.

The problem is that, for each database, there is a "home screen" which links to different layouts for different activities, and if a user clicks a link to a layout that they don't have the privileges to view, they get the giant NO ACCESS message, but no way to get back (we would like to remove the status area for the users. Navigation should be programmed in)

Now that all of our users have been upgraded to FMP10, I know I have access to script triggers. I was wondering if there was any way of having the script test if the user has access, and if not, send the user back to the database's home screen. Do On-Layout-Load script triggers even run on No Access layouts?

While I realize that I could set up a script to check the privilege set name, that would mean I would have to update all the scripts if I were to make a new privilege set, or rename an existing one. I feel it would be best if there was a way of testing "Yes, you have access to this layout" or "No, you do not, so go back," which would cover any changes I might make in the future.

Does anyone have any suggestions on this? Perhaps there is something simple I just don't know of yet. Thanks in advance.

-Q

First off, you might want to take a look at the Get(LayoutAccess) function. It will return the information its name implies for each Privilege Set and the Accounts attached to that Privilege Set.

Second, we have this:

The protected data is always on a seperate layout, and that layout is protected by the user privileges. That's fine.

What if the data are placed on a different layout than the ones you intended? Is it then still protected?

Steven

  • Author

Thank you, steven. It seems that that function will do what I need it to.

In response to your second question, I didn't go into much detail about our security, but yes, the data will still be protected. Our security goes deeper than simply blocking layout access.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.