altf4
Posts: 1035
Joined: Mon Feb 04, 2008 8:05 pm
Location: Thailand
Contact: Website

display 1 user in 2 applications

Wed Jul 09, 2008 12:58 pm

i have a small issue requires to display 1 unit/user in 2 applications.

like a company have 2 Departments with own assigned vehicles ..
but one vehicle will be shared.

so this one should apear in 2 applications.

is it enough to simply "copy" the group entrys and ajust the application_relation ?




--
Backups are for WIMPS!
http://0x8.in.th/where (website position GpsGate Powered)

User avatar
johan
GpsGate
Posts: 15160
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: display 1 user in 2 applications

Wed Jul 09, 2008 7:33 pm

You need to create one new entry in the user_groups table

INSERT INTO user_groups(user_id, group_id, group_right_id, admin_right_id) VALUES (Z, Y, 7, 3);

where "Z" is the user_id you want to add to the new app.
and where "Y" is the group id for vehicles in the other application. You find this group_id by
SELECT group_id FROM groups WHERE group_name = 'Vehicles' AND application_id = W;

where "W" is the ID of the application you want to add the vehicle to.

Regards,
Johan

Franson Support

altf4
Posts: 1035
Joined: Mon Feb 04, 2008 8:05 pm
Location: Thailand
Contact: Website

RE: display 1 user in 2 applications

Thu Jul 10, 2008 6:48 am

thats perfectly (just like i was planing to do it)

just one thing ... if i would now in Admin.aspx (VT) Delete this user .. it would be remove the whole set
all groups (original and linked group) plus the users and gate_user entrys ?

just for me to know how the admin.aspx handles the data.



--
Backups are for WIMPS!
http://0x8.in.th/where (website position GpsGate Powered)

User avatar
johan
GpsGate
Posts: 15160
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: display 1 user in 2 applications

Thu Jul 10, 2008 11:41 am

Deleting a user from an application will remove it from the groups of that application. Removing a user from the last application will remove all the users data, including tracks.

Regards,
Johan

Franson Support

altf4
Posts: 1035
Joined: Mon Feb 04, 2008 8:05 pm
Location: Thailand
Contact: Website

RE: display 1 user in 2 applications

Thu Jul 10, 2008 10:06 pm

thanks johan.

this mean if iam present with a user in 2 applications.
and someone would delete my user in Application A ... i would still be presenT in application B ?
(the application B relation was createt with the Insert into groups statement above) ..





--
Backups are for WIMPS!
http://0x8.in.th/where (website position GpsGate Powered)

User avatar
johan
GpsGate
Posts: 15160
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: display 1 user in 2 applications

Fri Jul 11, 2008 8:32 pm

Yes, that is correct.

There is no "home application" or similar concept. A user can migrate between application, and be part of as many is suitable.

Regards,
Johan

Franson Support

Return to “GpsGate Server - How to setup and use”