10 Replies Latest reply on Dec 30, 2014 8:51 AM by disabled_rosalie

    Privilege Set (Help)

      Title

      Privilege Set (Help)

      Post

      Hi Everyone,

      Please help me setting up my privilege on my database, Its been 1 week now since Im trying to play with the privilege set. I have set a privilege to my database in which I want all users to see their own records. 

      I have three tables Users, Time & Projects

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
      TablesViewEditCreateDeleteField Access
      UserLimited (CreationAccount = AccountName)Limited (CreationAccount = AccountName)--all
      TimeLimited (CreationAccount = AccountName)Limited (CreationAccount = AccountName)YesYesall
      ProjectLimited (CreationAccount = AccountName)Limited (CreationAccount = AccountName)YesYesall
      Any TableYesYesYesYesall

      If I will login as Rosalie with Privilege Set Name it shows all <No Access> except the AccountName field which is showing my name in all Tables.

      Please help and guide me.

        • 1. Re: Privilege Set (Help)
          philmodjunk

          Do you have a text field defined to store the account name in each table?

          Can you describe the design of the layout where you see this result? (what table is it based on? Is the accountName field that you see a field defined in the layout's table or a related table? is it a global field? or ???)

          • 2. Re: Privilege Set (Help)

            Hi Phil,

            Here are the fields in my Tables

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
            User Table
            Field NameType Options/Comments
             AccountNameCalculationUnstored, Get (AccountName)
            Name_FirstTextIndexed
            Name_LastTextIndexed
            Name_FullCalculationIndexed, Evaluate ( Name_First & \"\" Name_Last"; [Name_First ; Name_Last])
            idTextIndexed, Auto-enter Calculation [ Get(UUID) ]

             

                                                                                                                                                                                                                                                                                                                                                                                                                           
            Time Table
            Field NameTypeOptions/Comments
            idTextIndexed, Auto-enter Calculation [ Get(UUID) ]
            CreationAccountTextIndexed, Creation Account Name
             AccountNameCalculationUnstored, Get (AccountName)
            ID_TimeTextIndexed, Auto-enter Serial

             

                                                                                                                                                                                                                                                                                                                                                                                                                           
            Project Table
            Field NameTypeOptions/Comments
            idTextIndexed, Auto-enter Calculation [ Get(UUID) ]
            CreationAccountTextIndexed, Creation Account Name
             AccountNameCalculationUnstored, Get (AccountName)
            id_projectTextIndexed

             

                                                                                                                                                                                                                                               
            Table NameOccurences in Graph
            UserUsers
            TimeTime
            ProjectProject

            Relationships

            Users Table is Connected with Time Table (id)

            Time Table is Connected with Project (ID_Time  = id_Project)

             

            • 3. Re: Privilege Set (Help)
              philmodjunk

              This may not be the cause of what you see, but:

              Users Table is Connected with Time Table (id)

              Id in users links to what field in Time? Time::id auto-enters Get (UUID) and Time::id_Time auto-enters a serial number so neither field is correctly defined to match to id in Users.

              If I will login as Rosalie with Privilege Set Name it shows all <No Access> except the AccountName field which is showing my name in all Tables.

              The layout you access when you see this will be based on an occurrence of one of your tables. Which one? You have three different fields defined in three different tables that store or display an account name. Which field is the one that is visible on this layout?

              • 4. Re: Privilege Set (Help)

                Hi Phil,

                1. Users::id = Time::id

                2. The field that is visible on every layout is AccountName field.

                Do I also need to make a relationship between User Table and the Project Table?

                Thank you.

                Rosalie

                • 5. Re: Privilege Set (Help)
                  philmodjunk

                  1. Users::id = Time::id

                  From what you have posted, that is not the case. If Users::id uniquely identifies each record in Users, Time::id should be a text field without any auto-entered UUID value. If Time::id uniquely identifies each time record, then the Users::id field should be a plain text field. That could just be an error in how you posted your descriptions of the tables.

                  You still have not answered this question: On what table occurrence have you based this layout? This will be named in Layout Setup|Show Records from.

                  Do I also need to make a relationship between User Table and the Project Table?

                  While that would seem logical, I can't really tell from what you have provided thus far and the presence or absence of such a relationship shouldn't be a factor in the <<No access>> result that you are getting.

                  • 6. Re: Privilege Set (Help)

                    Hi Phil,

                    Sorry for not answering it immediately. in the Time table.

                    Thanks.

                    Rose

                    • 7. Re: Privilege Set (Help)
                      philmodjunk

                      Is the "lock expression" for the time account actually this?

                      CreationAccount = Users::AccountName

                      If you open the file with a full access account and examine these same records, are there any records on the time table where these two fields are equal?

                      If you then access the file using "Rosalie", can you find and see the same record or is it also covered by the "no access" screen?

                      • 8. Re: Privilege Set (Help)

                        Hi Phil,

                        Its working now, I changed it all to  [CreationAccount = Users::AccountName]. I can see now the record that I created using my Account Rosalie, but I have problem again, the record that I created using the admin account Showing <No Access>. I there a way to omit those records? or a script maybe?

                        Thanks a lot.

                        Rose

                        • 9. Re: Privilege Set (Help)
                          philmodjunk

                          I've been leading you up to this point by first examining whether the record level access control is working or not. Now we can look at ways to hide the "no access" records.

                          Any find you or a script performs will automatically omit the "no access" records from the current found set. You can thus set up a script performed by either the OnFirstWindowOpen or OnLayoutEnter script triggers that performs a find.

                          Here's one example, but others are possible:

                          Enter Find Mode [] ---> clear the pause check box
                          Set Field [Time::creationAccount ; Get ( AccountName ) ]
                          Set Error Capture [on]
                          Perform Find []

                          • 10. Re: Privilege Set (Help)

                            Hi Phil,

                            Thank you so much for your help and patience to a newbie like me.

                            I really really appreciate your kindness.

                             

                            Rose