March 31, 200916 yr Is it possible to retrieve the privilege set of an account using the FileMaker object or anything else?
April 1, 200916 yr 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?
April 1, 200916 yr 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 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 April 1, 200916 yr by Guest
April 1, 200916 yr 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.
April 1, 200916 yr 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 April 1, 200916 yr by Guest
April 1, 200916 yr sorry Firefox locked up and didn't appear to have submitted the reply Edited April 1, 200916 yr by Guest double post
April 2, 200916 yr 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