Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I have a client with a solution they have been using for many years which uses Custom Privileges for Record Access to control which records users can view and edit, which has worked well for them. They now want to give users access via the web so I'm working on a PHP website for them.

 

One potential stumbling block is how the custom privileges are implemented - the OnFirstWindowOpen script sets some globals based on their user record, which are then referenced by the custom privileges record access calculation. For example they have a field in their Users table for the "account group" the salespeople belong to, on on startup this is set into a global field. The calc for the custom privileges is the Prospects table then references this global field to control whether they can view/edit records, e.g.

 

Users::gAccountGroup = Prospects:AccountGroup

 

The issue here is that this works when accessing via the FileMaker Pro application on the desktop, but when accessing via the PHP site they cannot see any records, as I'm assuming the issue is that the Users::gAccountGroup global field is not being set and global fields work differently via the PHP site. I can use PHP session variables in place of the FileMaker global fields, but can't see how I can incorporate this into the calculation that is used for the limited access in the Privilege Sets.

 

If anyone has suggestions or has a solution that uses limited access custom privileges I'd love to hear how you solved this problem.

 

thanks,

Steve

Posted

Dang - just answered this on FMWebSchool...

 

Globals are tricky on the web, as they get reset to default for *every* web transaction.

However, you're halfway there.

On login, use the Users table to set a session variable to grab the account group. The use that variable in every search that's available to them via the web to see which records are accessible...

HTH

This topic is 4335 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.