5 Replies Latest reply on May 10, 2013 6:50 AM by philmodjunk

    Getting security permissions from an external data source

    FileMakerNovice

      Title

      Getting security permissions from an external data source

      Post

           Hello all,

           I have a database that is accessing an external data source.  I will call the external source "Data" and the local database "Local".  

           When Local launches, it signed into a "Standard" user.  I restricted all edit access to menus, layouts, scripts, etc.  The Data file has multiple privilege sets:  Admin, Manager, Employee, etc.

           What I'm looking to do is further restrict the Local file.  For instance, there is a pop up that allows managers to view and edit hours worked.  I only want the Manager privilege set to be able to view.  For the Employee set, I'd want something that displays a message.

           Is there a command or get feature that can access the external source's security groups?

           Thanks in advance.

        • 1. Re: Getting security permissions from an external data source
          philmodjunk

               Sort of. Assuming that your external data source is a FileMaker file, you can use perform script in the local file to perform a script in the external file. The script in the external file can then check the account name and/or privilege set name used to open that file.

               Alternatively, you can define matching accoutn names, passwords and privilege set names in both files. A script can be used to keep them synched whenever you add or change an account in the local file.

          • 2. Re: Getting security permissions from an external data source
            FileMakerNovice

                 Phil for the win again!  Hey bud, thanks for the reply.  You've helped so much of the last few years.

                 The Data file is in FileMaker format but the "Accounts" (aka usernames) are using an external non-FileMaker server.  Therefore, I would need to call the "privilege set" names.  Can this be done?

                 Alternatively, I could do a check for access to certain fields.  If the user does not have access to a field, I can run a script that returns a true/false value to be used in the local file.  I can then change allow/disallow the pop up.  I would assume this would be using error capture to gather error 202.

                 Am I going down the wrong path?  What would be the steps to do this?

                 Thanks again for the reply.

            • 3. Re: Getting security permissions from an external data source
              philmodjunk

                   account names and user names are not the same thing, But your Filemaker file should still have account names and privilege set names even though you are using external authentication. The different groups you define in the external authentication should still match up to specific accounts and privileges. That may not identify the specific user, but should be enough to identify the permissions specific to a given privilege set.

              • 4. Re: Getting security permissions from an external data source
                FileMakerNovice

                     Oh... barely missed ya.  I figured it out!  Here's how I did it:

                     In data file, I created a script that simply exited the script and returned the result: Get(AccountPrivilegeSetName)

                     In the local file, I called the script, set a variable to Get(ScriptResult) and then made an if statement to display a message.

                     Hope this helps anyone with my roadblock.  My main problem was I was searching the "Get Functions" for "security" instead of "privilege".  I didn't think there was a get function for my problem.

                     Thanks again Phil.

                • 5. Re: Getting security permissions from an external data source
                  philmodjunk

                       Exactly what I had in mind.....