traccar / traccar-web

Traccar GPS Tracking System
https://www.traccar.org
Apache License 2.0
814 stars 1.13k forks source link

hide deviceid and phone number when deviceReadOnly is selected #1114

Open carlock2022 opened 1 year ago

carlock2022 commented 1 year ago

normally users with DEVICE READONLY are selected like this so that they cannot see or modify anything on the devices, this hides the deviceid and shared phone tables in those cases

DevicesPage,js.txt

tananaev commented 1 year ago

What's the reason for hiding?

carlock2022 commented 1 year ago

2 reasons, most of the providers (understood as installers or those who sell the equipment together with their system to the users) also provide the equipment and the sim (this procedure is common in Mexico, Ecuador, Venezuela, Colombia, and Panama) to them They are not interested in the user knowing the id (for changes and guarantees) or the telephone number assigned to the vehicle, this is due to reason 2, users are curious, and in those areas they are very common (and those with the most market brands like concox, coban, sinotrack, etc., all of them are managed by SMS, in addition to having functions that are executed if they are called, it is easier to deal with many types of users when they are unaware of these factors of the gps placed

tananaev commented 1 year ago

That's all great, but how is this related to device read-only permission?

carlock2022 commented 1 year ago

almost everyone I've talked to who uses traccar or has used it checks the DEVICEREADONLY box that's the normal function of the user so they can't see internal data like imei number edit it, delete it, in previous versions DEVICESPAGE was hidden in the users with that variable if I remember correctly, in this the link to connections appears in that tab, therefore that is not viable,

tananaev commented 1 year ago

You could always see it in previous versions.

Also we moved the linking to a separate page. You should probably check the latest version first.

carlock2022 commented 1 year ago

you changed it here on settingsmenu it was not show before when devicrereadonly was selected https://github.com/traccar/traccar-web/commit/0ca058f1c69827b41fa3a414917ab1cbebfb84e6#diff-fac3085b707a40cfd8902511e84439c37651682f219c77536eb01a5e65a7754f the link to conections is in devicespage so it cannot be hidden back

tananaev commented 1 year ago

The path was always available.

carlock2022 commented 1 year ago
        {!deviceReadonly && (
          <MenuItem
            title={t('deviceTitle')}
            link="/settings/devices"
            icon={<SmartphoneIcon />}
            selected={location.pathname.startsWith('/settings/device')}
          />
        )}  
carlock2022 commented 1 year ago

tha was on devices page before

carlock2022 commented 1 year ago

https://github.com/traccar/traccar-web/commit/0ca058f1c69827b41fa3a414917ab1cbebfb84e6

tananaev commented 1 year ago

It seems like we're going off topic here. I'll leave this open to gauge the interest.