4 Replies Latest reply on Nov 17, 2009 10:16 AM by ninja

    Restricting Record Access PLEASE HELP!

    soundtrackit

      Title

      Restricting Record Access PLEASE HELP!

      Post

      So I have set Record privledges so that a field called "username" = Get(AccountName)

      This has caused some problems:

      1) All the records that do not meet this criteria show up as <No Access> - is there a way to filter these out?

      2) When logged in as a restricted user, I cannot perform any Finds. It allows me to go into Find mode but tells me there are no records that match... however if I get rid of the privilege restriction on the Records and do the same find, it works. How can I solve it so that I can restrict access to the records but allow the user to perform Finds???

       

      PLEASE HELP!! THANKS 

        • 1. Re: Restricting Record Access PLEASE HELP!
          ninja
            

          Howdy soundtrack,

           

          1. You see all of the <no access> because you are viewing records that you have no access to view.  This can be made more convenient by working within found sets.

           

          The script that runs on startup should include:

           

          Enter Find Mode

          Setfield [Table::username ; Get(AccountName) ]

          Perform Find []

           

          Then you'll be looking at a found set of records you're allowed to view.

          I additionally include a find script attached to buttons on the layout...my "Show All" button actually performs the find shown above to avoid all of the <no access. records.

           

          2. If you type in criteria that only matches records you aren't allowed to see...there are none found.  Perform a find for something you know you're allowed to see and it should find it.

          • 2. Re: Restricting Record Access PLEASE HELP!
            soundtrackit
               Cool. How do you configure the "Show All" button to do that?
            • 3. Re: Restricting Record Access PLEASE HELP!
              mrvodka
                 What version of FM do you have? If you have advanced, you can use custom menus to override the show all command to perform a * find in your primary ID field.
              • 4. Re: Restricting Record Access PLEASE HELP!
                ninja
                  

                Write a script:

                Enter Find Mode

                Setfield [Table::username ; Get(AccountName) ]

                Perform Find []

                Place a button on the layout that says "Show All"

                Under button Setup, choose "perform script" and specify the script above to be performed.

                 

                While the button says Show All, it actually performs a find for the records you're allowed to see.