4 Replies Latest reply on Apr 14, 2011 12:03 PM by philmodjunk

    Login and password Question

    PeterDowns

      Title

      Login and password Question

      Post

      In a previous life when I used to play with access I had a login scenario where the users login and password was controlled by a users table, and this determined via a security level number what navigation buttons they were allowed to see or were visible. The images were referenced via a table and given a user level.So a user with higher security level saw more navigation buttons and therefore accessed more of the site. Also they could update their password and username as well as several administrators could control access to various levels. My question relates to FMP and I have now set up a database with several hundred users. I have set several user profiles via the FMP security accounts.

      However is it possible to - 

      1. direct users to a particular layout via their account level. For example if you are an administrator you default to layout 1 when you logon, if you are an editor you see layout 2, viewer layout 3. Or can you turn buttons on or off for viewing by particular account levels.

      2. Can the users login run from a table of user details or does it have to go through the fmp account system. We have high turnover of users changing positions so a new user often replaces another but in the same position (ie new principal) so their details are being updated regularly so we need to have users or administrators being able to update details but not change their security or viewing levels.

      Cheers

      Peter

        • 1. Re: Login and password Question
          PeterDowns

          I think I might be on the right track for the 1st question. I have set up a script called Script Start that is linked to a script trigger that on open/close of the database the script is performed.

          Here is my script:

          If [Get ( AccountPrivilegeSetName )= "Full Access"]
              Go to Layout ["networkAdmin" (capNetwork)]
          Else If [Get ( AccountPrivilegeSetName )= "Data Entry Only"]
              Go to Layout ["networkTemplate Copy" (capNetwork)]
          Else If [Get ( AccountPrivilegeSetName )= "AccessParameters"]
              Go to Layout ["networkAdmin_Users" (capNetwork)] 
          Else If [Get ( AccountPrivilegeSetName )= "Read-Only Access"]
              Go to Layout ["networklibrary" (capNetwork)]
          End If 

          When it runs the users with Access Parameter settings go to the correct layout, all the others go to the default home page. Am I missing something??

          Cheers

          Peter

          • 2. Re: Login and password Question
            philmodjunk

            The full access privilege set name is "[full access]"

            You'll need to double check other such details in Manage | Security to see if the privilege set names exactly match the text you have put in quotes.

            You may want to temporarily add Show Custom Dialog [Get ( AccountPrivilegeSetName )] to double check what is returned for each account as a way to debug this.

            Also make sure that there's no layout based script trigger that takes the user to your default home page in place on any of these layouts. OnLayoutEnter or OnRecordLoad, could, at least in theory, kick in after your script finishes to perform a script that takes the user to a different layout.

            • 3. Re: Login and password Question
              PeterDowns

              Worked brilliantly. Just put in the missing brackets and worked a treat.

              If [Get ( AccountPrivilegeSetName )= "[Full Access]"]
                  Go to Layout ["networkAdmin" (capNetwork)]
              Else If [Get ( AccountPrivilegeSetName )= "[Data Entry Only]"]
                  Go to Layout ["networkTemplate Copy" (capNetwork)]
              Else If [Get ( AccountPrivilegeSetName )= "AccessParameters"]
                  Go to Layout ["networkAdmin_Users" (capNetwork)] 
              Else If [Get ( AccountPrivilegeSetName )= "[Read-Only Access]"]
                  Go to Layout ["networklibrary" (capNetwork)]
              End If 

              Extension on this question if you have different AccessParameter profiles how would you distinguish between the different profiles so they could open up in different layouts.

              For example -

              User 1 -may be able to Create, edit, and delete in all tables
              User 2 - may be able to Create and edit in all tables

               but they both come up as AccessParameters 

              Cheers

              PEter

              • 4. Re: Login and password Question
                philmodjunk

                Give them different privilege sets so that they don't come up AccessParameters. That's the purpose of having privilege sets. You can then set these limits in the different privilege sets.