Multiple companies using same app

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
dlee
Veteran Member
Posts: 137
Joined: 2020-04-14 00:21
Location: South Carolina, USA
Contact:

Multiple companies using same app

Post by dlee » 2020-04-25 22:10

I want to create an app that multiple fire departments will be using. The problem is the firemen almost always work for more than one of the departments so I can't identify which department they are signing in for on just the username along. Since every fire department is issued an id number by the government, I think that id number could be used somehow. If I could identify which department they are logging in for then I could create a group for each fire department and assign them to that group. BUT, I would need to have subgroups for each department so I can assign permissions per user.

I am hoping you guys have a solution for this,
TD

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Multiple companies using same app

Post by onoehring » 2020-04-26 07:20

Hi TD,

I think you asked something similar the other day.

Imho is does not matter from which department they log in. You should instead give the possibility to filter by department (display that in a column).
Why I think it does not matter for what they log in? If they are attached to several departments, they might do some lookup/entry for different departments on the same login.

Maybe take a look at my Column value based Permissions (CVP, viewtopic.php?f=4&t=3498 ):
This enables you to have 1 fireman in n departments. As department is a column, you can allow access to certain records based on that column.

Example:
AppGini Group (your government ID numbers; usergroup in AppGini)
A
B
C

Setting in CVB Permissions:
Department A can see "north" and "west"
Department B can see "north" and "south" and "west"
Department C can see "east"

results / effects
Man_1 is in dep. A -> sees records for NORTH and WEST
Man_2 is in dep. B -> sees records for NORTH and SOUTH and WEST
Man_3 is in dep. C -> sees records for EAST

The assignment for CVB permissions is done using the AppGini groups (department A, B, C...) and you set what users from these groups have access to (or do not have access to -> read the docs!), based on some column.

Olaf

dlee
Veteran Member
Posts: 137
Joined: 2020-04-14 00:21
Location: South Carolina, USA
Contact:

Re: Multiple companies using same app

Post by dlee » 2020-04-26 15:09

Thank you for that detailed response. I will go now and read the documents on group's.

TD

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Multiple companies using same app

Post by onoehring » 2020-04-27 05:58

Hi,

you are welcome. I meant to suggest to read the docs of my CVB :-)

Olaf

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Multiple companies using same app

Post by pbottcher » 2020-04-27 21:01

Hi,

just a simple thought. Why do you not provide a page after login where the firemen needs to pick for which department they want to act with this login. Dropdown with possible departments for that login. Once he picked the department you have the required information and can assign the correct group. No need for fancy permission settings.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Multiple companies using same app

Post by onoehring » 2020-04-28 08:19

Hi,

adding to pbötchers idea, you could set that department as session variable and add a link to that page to your navigation bar (/hooks/nav-...). This would enable people to switch departments while staying logged in.

Olaf

dlee
Veteran Member
Posts: 137
Joined: 2020-04-14 00:21
Location: South Carolina, USA
Contact:

Re: Multiple companies using same app

Post by dlee » 2020-04-28 19:31

Thank you both for trying to help with this. After much thought I have decided to setup my website with sub-folders, one for each fire department, with their copy of my app and their own database in MySQL. My reason is this will be a SaaS product and I absolutely have to make sure the different fire department's data doesn't get mixed up with another department's data.

Thanks again for trying to help!
TD

Post Reply