Users and groups. Problem

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
facos79
Veteran Member
Posts: 115
Joined: 2014-10-29 12:31

Users and groups. Problem

Post by facos79 » 2022-08-02 12:00

Good morning everyone,
I have an appgini application created to memorize documents and information on consultancy interventions performed at my clients. My customers have access with their own user to the relevant table. I'll give you an example: there are 3 users (Marco, Silvia, Nadia) and there is my administrator user Fabio.
There are n. 3 tables where the information is stored: TableMarco, TableSilvia, TableNadia.
Each user can only view the information entered in the specific table with the same name: Marco can only view the information stored in the Marco Table, Silvia those in the Silvia Table and Nadia only those in the Nadia Table.
I have to upload the information through my user Fabio.
How can I upload the information and allow it to be viewed only by its users and not by others? Of course I have created groups to give permissions but my user Fabio cannot be part of more groups.
Do not create my user for each group also because the groups in the example are only 3 but in reality they are 350.
Thanks for your help



---- in italiano ----
Utenti e gruppi. Problema

Buongiorno a tutti,
ho un'applicazione appgini creata per momorizzare documenti ed informazioni su interventi di consulenza eseguiti presso i miei clienti. I miei clienti hanno accesso con un proprio utente alla relativa tabella. Vi faccio un esempio: ci sono 3 utenti (Marco, Silvia, Nadia) e c'è il mio utente amministratore Fabio.
Ci sono n. 3 tabelle dove vengono memorizzate le informazioni: TabellaMarco, TabellaSilvia, TabellaNadia.
Ogni utente può visualizzare solo le informazioni inserire nell'apposita tabella con lo stesso nome: Marco può visualizzare solo le informazioni memorizzate nella TabellaMarco, Silvia quelle nella TabellaSilvia e Nadia solo quelle nella TabellaNadia.
Le informazioni devo caricarle io tramite il mio utente Fabio.
Come posso fare a caricare le informazioni e permettere che vengano visualizzate solo dai relativi utenti e non dagli altri? Ho Naturalmente creato dei gruppi per dare le autorizzazioni ma il mio utente Fabio non può far parte di più gruppi.
Non creare un mio utente per ogni gruppo anche perchè i gruppi nell'esempio sono solo 3 ma nella realtà sono 350.
Grazie per l'aiuto

AhmedBR
AppGini Super Hero
AppGini Super Hero
Posts: 327
Joined: 2013-09-19 10:23

Re: Users and groups. Problem

Post by AhmedBR » 2022-08-02 12:30

If I understood correctly then I think you only need two groups:
Fabio has access to ALL, and after submit you change owner to the user.
all other users are in one group, and only can view OWN (which was defined by Fabio in the previous step).

You can put even make only one group for all, and Fabio has special permission to view ALL or ALL of the group, all the rest just OWN.
that is it.
Keep it simple.
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

facos79
Veteran Member
Posts: 115
Joined: 2014-10-29 12:31

Re: Users and groups. Problem

Post by facos79 » 2022-08-03 18:41

Hello,
correct. Fabio has access to all the tables but each individual user has access only to the information entered by him and should also be able to view the information entered by fabio concerning him (the personal data cell identifies the customer).
The problem is that everything that Fabio enters cannot be viewed by other users because fabio cannot be part of several groups at the same time (if you could this would be the solution to my problem).
The first solution you propose works but for each insertion I would have to change user owner and this is frankly very inconvenient because the information I have to insert is many and are not all related to one user but to different users.

Isn't there another way to automate the change of ownership procedure?

AhmedBR
AppGini Super Hero
AppGini Super Hero
Posts: 327
Joined: 2013-09-19 10:23

Re: Users and groups. Problem

Post by AhmedBR » 2022-08-03 20:56

automating the owner is fairly simple, just see what Fabio enters to determine the records belongs to which user.
use THAT to automate the change owner.

What is it that Fabio enters to determine which user can view the record?
user Id, username, some ID number?
With that info we can write a small sql to update the owner, I do it all the time.
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

Post Reply