Forum Discussion

JessicaMatenga's avatar
Qrew Trainee
2 years ago

Locking down users by company (multiple companies on one app)

Hi Team
The solution is attached to this link, however I am just a bit confused about the last two steps in the process -
1. Custom Role Permission - where exactly is this set up? what table is this set up in/
2. One Role - "Users who are limited to their own department" where is this role created 

Your expert assistance appreciated.

Jessica Matenga

3 Replies

  • Jessica
    The essentials of the technique is this

    A very powerful technique if you need to control which record users see and don't wants to have a zillion Roles - never have a lot of roles !! - is to create a table of users where the key field is the userds.

    Then in your details tables make a formula User field called [Current user] with a formula of user and then make the formula User().  Then make a relationship based on that field to the userid table and look up say a field  for "department".

    Then make a Custom Role Permission rule that regular users may only see / edit records where  [Dept] is equal to [Current User- Dept]

    So then you have one Role called "Users who are limited to their own department".

    So one Role covers off 100 or 1000 departments.

    To answer your questions.
    Custom Role Permission? Your app will have several Roles like Participant or Assessor or Building Group Manager.  When you edit those Roles there is a setting under View and also under Modify for Custom Rule.  If some of those Roles are to be limited by Company, then  you would use the Custom Rule there. 

    Mark Shnier (Your Quickbase Coach)
    • LaurenJeppson's avatar
      Qrew Member

      I know this is an old thread, but wondering if this works if you also have an EOTI role in the app? I'm running into issues trying to set up multiple individuals from the same customer having access to only their company's records, without having to set a new role for each customer.

      Lauren Jeppson
      • MarkShnier__You's avatar
        Icon for Qrew Legend rankQrew Legend

        Your real users are part of the 3 billion people in the world who have access to the internet, so Quickbase will see them in two Roles - one restricted by Company and perhaps a Role not restricted if you have opened up your app to EOTI access to the tables involved.

        When a user is in multiple roles, the system will allow the most permissions based on all the Roles they are in.

        Mark Shnier (Your Quickbase Coach)