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

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

Recommended Posts

Posted

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?

Posted (edited)

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
Posted

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.

Posted (edited)

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
Posted

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

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

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