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.

Retrieve Privilege Set for the account that logs in?

Featured Replies

Is it possible to retrieve the privilege set of an account using the FileMaker object or anything else?

  • Author

This is for FileMaker, isn't it? I'm looking for the PHP function.

If you want the name (not the actual privileges) Not directly. In theory either of the following should work.

You could have a calculated field set to Get(PrivilegeSetName) (make sure to check "don't store calculation results)

You could also run a script that sets a field to the same value.

What exactly are you trying to accomplish?

  • Author

I have a website that where admin can allow or not login without passwords(for read-only accounts). The admin section requires a password. On the account that a client would require login for everyone, I don't want him to have to relogin when he tries to enter the admin section. I was thinking about storing the privilege set in a variable after the login and verify if it's the proper one when one tries to enter the admin section, and if not, redirect to the login.

EDIT B) So I just read on other places and it does seem you can't do it without a field on your database. That's unfortunate.

Edited by Guest

Sometimes I look for "No Replies" and don't pay attention to the forum section, so I misunderstood what you were asking for. Sorry about that.

If I understand you correctly and your admins will be logging in with their Filemaker admin passswords, the following should work. Create a layout that only the admin privilege set has access to.


require("FileMaker.php");

$fm = new Filemaker($database, $server, $user,$password);

$layouts = $fm->listLayouts();

if(array_search("adminLayout", $layouts) === false){

	echo "Not Authorized";

}

/*Be sure to use === because in php 0 == false */

see http://us3.php.net/manual/en/function.array-search.php for more information about array_search

Edited by Guest

sorry Firefox locked up and didn't appear to have submitted the reply

Edited by Guest
double post

  • Author

It's ok Fitch. I figured you made a mistake.

Good idea Baloo. I will do that, and make everyone parameters layout admin only.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.