5 Replies Latest reply on Aug 22, 2013 2:53 PM by djones

    IWP conditional web layout address

    djones

      Hi

      Currently I have a database at http://filemaker.scotch.sa.edu.au/fmi/iwp/cgi?-db=documentarchive.fmp12&-loadframes with IWP Guest access - I don't want to implement authenticated access for IWP. A Startup trigger script opens the layout StaffSearch. The above link is accessed from the staff page on our intranet web site.

       

      However, on the student intranet page, I want students (Guest access again) to be taken to the layout StudentSearch. Is there a way of including a layout name in the above web address?

       

      Or in the Startup script, is there a way to recognise the originating web address so that students can be directed to a different layout?

       

      Thanks in advance.

      David

        • 1. Re: IWP conditional web layout address
          steve_ssh

          Hello David,

           

          If:

           

            a)  It were possible to navigate the user based on a layout name parameter supplied in the web address,

           

            - and -

           

            b)  The system does not require authentication,

           

          Then:

           

          Lacking any further conditions, it seems that there would be little, if anything, to prevent a Staff user from using the URL to access the StudentSearch, or vice versa: a Student user using the URL to access the StaffSearch.

           

          Automatically navigating the user based off of the URL would be a convenience, but it would offer no access restriction.

           

          Would this pose a security risk for your system, or is there no such security risk involved in this scenario?

           

          Kind regards,

           

          -steve

          • 2. Re: IWP conditional web layout address
            RubenVanDenBoogaard

            Hi David,

             

            You can not do this from the same account, there is no way for IWP to see which user is entering.

             

            I would suggest to make at least 1 account 'staff' with IWP rights and use an URL with user and password to enter the database and use the Get ( AccountName )

            command to see which user enters, and go to the appropriate layout.

             

            An url with user and password can be something like this:

             

            http://<server>/fmi/iwp/cgi?dbpath=%2Ffmi%2Fiwp%2Fcgi%3F-db%3D<database>%26-startsession&acct=account&name=<account>&password=<password>&login=Login&-authdb

             

            An other possibility, but less elegant, would be to make a separate database 'Staff' and log into that for the staff. Then use the start script of the Staff database to start the Documentarchive database with the paramameter 'Staff' and handle the rest in the Documentarchive database.

             

            Hope this helps,

             

            Best regards,

             

            Ruben van den Boogaard

            Infomatics Software

            ruben@infomatics.nl

            • 3. Re: IWP conditional web layout address
              djones

              Thankyou Ruben. Your suggestion of using

              http://<server>/fmi/iwp/cgi?dbpath=%2Ffmi%2Fiwp%2Fcgi%3F-db%3D<database>%26-startsession&acct=account&name=<account>&password=<password>&login=Login&-authdb

              is a good solution.

              Both staff and students can only browse the database ayway (it's a hints & tips database in which some records are only relevant to staff), and the staff data is not very sensitive.

               

              Thanks for yoour help.

              David

              • 4. Re: IWP conditional web layout address
                Nerico

                Ruben,

                 

                Can you explain this a little bit more?  I'm new to IWP and I'm not sure I undestand the mechanicsof how to use the URL.  A little more step by step might make more sense to me.

                 

                Thanks.

                • 5. Re: IWP conditional web layout address
                  djones

                  Nerico

                  Create two accounts in your database (called MyDatabase), eg. staff (with password=zzz) and student (with password=ccc).

                  Create a script On Start, which has: if get(AccountName)=staff then go to layout Staff else go to layout Student.

                  In Options>Script Triggers, set OnFirstWindowOpen to the On Start script.

                  All done.

                   

                  Now on the web pages that access the database, have two different links, one for staff and the other for students:

                   

                  http://<server>/fmi/iwp/cgi?dbpath=%2Ffmi%2Fiwp%2Fcgi%3F-db%3DMyDatabase%26-startsession&acct=account&name=staff&password=zzz&login=Login&-authdb

                   

                  http://<server>/fmi/iwp/cgi?dbpath=%2Ffmi%2Fiwp%2Fcgi%3F-db%3DMyDatabase%26-startsession&acct=account&name=student&password=ccc&login=Login&-authdb

                   

                  Hope this helps.

                  David