Managing multiple Roles for a single user

  • 0
  • 1
  • Question
  • Updated 7 years ago
  • Answered
I have been using QuickBase for a while now and one part of my app that has been neglected, unfortunately, is the Role management. I want to rein this in and get better control of Roles and simplify the process of adding new external users/roles.

Essentially, I have the need to give access to a wide number of users from a large number of organizations outside of my own organization. I want to centralize the management of Client access into one general role (i.e., Client Role) that defines the general access levels of any Client user. From here, each organization must ONLY have access to the records associated with their organization. 99% of the records created in my app are NOT created by these Client (external) users, so it is not really feasible to control this with user groups (in other words, they aren't the record owners). So, I will likely need secondary roles for each Client Organization that simply applies record filtering based on the Client Organization ID that is associated to a record (done manually upon record creation by an Internal User).

I am trying to eliminate the process of fine tuning each individual organization's role every time I need to create a new role for a new client. Yes, I can duplicate existing roles, but let me explain the drawback to that. Relying on a copy of a Role does not allow me to efficiently manage all Roles. For example, if the template role being used for clients is used to make 10 new Client Organization Roles and then some time in the future the template role is updated/changed those changes do not translate to my previously created roles using the template. Therefore, instead of a single overarching update, I would have to make the same changes 11 times to cover my roles. Depending on the complexity of roles, this can be an extreme pain.

As I mentioned before, I have not spent a ton of time deep diving into QuickBase Roles, but what I am looking for is not immediately obvious to me. So, I am looking for a little advice or help in designing and organizing "nested" roles in QuickBase to better streamline my role management.


Many thanks in advance!
Photo of Brian

Brian

  • 0 Points

Posted 7 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,760 Points 50k badge 2x thumb
Lets say you have 25 clients and you don't want to maintain 25 Roles. I suggest that for these external users you set up a single role called Clients.

Then set up a table which will list all your external client userids.

Set the Key field to this table will be the userid.

Set up a field on that Table which has the Client - say by making a relationship there so you know the Related Client they are allowed to see.

Then on each table you wish to restrict access to set up a Formula-User field called [Current User] with a formula of User() and build a realtionhip back to the Users table such that 1 User is related to many "records" by this Current User field.

.. almost there - now pull in the Related Client I am allowed to see field from that relationship into your table with "records".
Lastly, set up a formula checkbox field that will calculate to True if the client is the one they are allowed to see. Call it say [Allowed to see this Client]

Finally set up a single Permission Rule for your Clients Role where [Allowed to see this client] is checked.

So, basically every one of your records can know what the allowed client is for that user and every record will know if it's allowed to be seen by that user.

Post back if you get stuck - i have done this myself for apps. There is a double setup for new external users - they will needed to be invited to the app in the Role Clients and also added to that external user table to define which client they are allowed to see.

Mark
Photo of Brian

Brian

  • 0 Points
I will give this a try and let you know how it goes.

Thanks, Mark!
Photo of Brian

Brian

  • 0 Points
Mark,

I have tried to follow your example but think I am missing something here...  most likely involving a relationship.

The Related Client field isn't passing back to the "records" table (I will call it the Inventory Table) from the User table.

I essentially have 3 tables involved:
     Inventory
     Companies (consisting of clients)
     Users

Companies Table has following fields:
     Company ID (record ID#) - key
     Company Name (text)

Users Table has following fields:
     User  (user) - key  
     Related Company (number)

Inventory Table has following fields:
     Inventory ID
     Related Client ID - from relationship to Companies Table
     Current User (formula - user)  - formula is "User()"
     Current User - User (user lookup) - from relationship between Vehicles < Users
     Current User - Related Company (numeric lookup) - from relationship between Vehicles < Users
     Authorized User (formula - checkbox) - the formula here is flimsy mainly because I have no re
     
It seems I have not designed the relationship between Users and Vehicles correctly(?).

Any thoughts?  

THANKS!
Photo of Mark_Shnier

Mark_Shnier

  • 570 Points 500 badge 2x thumb
We will get this working.  if necessary i can have a look at you app.  You setup looks pretty good.  the I gather that Inventory and Vehicles means the same table.  The companies table looks correct.  The User table looks correct.  

In the Inventory Table you say you have a field  Current User - User (user lookup) - from relationship between Vehicles < Users.  I don't know why you would need that.  But lets also be clear of the direction of the Relationship between Users and Vehicles.  One User has many vehicles.  Your < symbol indicates that is backwards in your set up.  So, in fact for the Current User every vehicle is related to that record for the current user, and then  you should be able to pull down a lookup from the User table - which you seem to have done, so maybe that relationship is in the correct direction after all.  can you confirm what the field is for the relationship between the User table and the Vehicles table.  It should be [Current User] .  You should be able to load yourself into the user table, select a company, and then see that company record ID be pulled across to the vehicles table.

If you can't get it working contract me via my signature line and I will have a look at your app and post back what the problem was when its fixed.

Mark
Photo of Brian

Brian

  • 0 Points
Mark,  

I got it working correctly as you described in your original answer.   I decided to scrap the fields and relationships I had created for this purpose and started over.   I must have made a silly mistake somewhere, but everything appears to be working perfectly now.

This will be a big time saver going forward with role management!  

Thank you very much for taking the time to help with this!
Photo of Mark_Shnier

Mark_Shnier

  • 570 Points 500 badge 2x thumb
Glad it worked for you!  I'm sure that this question will come up again, so hopefully I will be able to find this post when it comes up again.

This conversation is no longer open for comments or replies.