Option to disable device management for non-admins

fnobre9 years ago

Dear Anton, first of all congratulations for the excellent system. I have just noticed in version 3.2 that now same device can be associated to multiple users. I would like to suggest one small change for next release that can make Traccar web interface much more useful: the option to disable device management buttons [add/edit/delete] for non-admins. This can be a global option like [Registration].

Reason: as Traccar is today, any user has the power to delete a device(or add unwanted devices), making it unpractical to use in production, as often times you want some users to see the info but not edit settings that can affect the function of the system.

Because v3.2 allows admins to link a device to other users, the scenario I suggest (with the option disabled for non-admins to manage devices) would allow the following path for admins
1- Admin adds devices
2- Admin links devices to users that should see it
3- Users can login and see the devices allowed by admin, but not change that.

This feature would also make the self-registration feature more useful, as in my case I don't mind that people self-register to my server, but I want to control what devices are added to the server/users

I hope that this is a simple feature to add. It would mean a huge improvement to the usability of Traccar.

Regards

fnobre

Anton Tananaev9 years ago

Excellent idea and it should be fairly easy to implement. I have added it to my TODO list.

fnobre9 years ago

Great to know is going to happen. Looking forward to it. As you might have noticed, the new feature of linking one device to multiple users brought a new problem: any user even non-admin can delete a device, and this means he is deleting the actual device (not just the link to his user) so the device will disappear for all users and its history will be lost. So my idea helps to mitigate this problem.

I am sure that with time your user management and web-interface features will evolve. You might want to benchmark openGTS on this matter. Even if their system is a pain to install and to add devices, and the interface is ugly, the user management has very granular control, that starts at the top where each admin user is actually a new "company" in the server (each company is independent from the others, with its own users, devices , groups, interface branding) and the user/device control allows groups(of users and devices), with permission controls for every interface feature, report, etc.

One other little detail you might want to add to your TODO for now is to restrict the delete of the "admin" user (id 1). As the system is now, any admin user can delete all users including the "admin" and himself, rendering the system un-usable with zero users.

Again congratulations for the excellent system, very well structured in every aspect.

Anton Tananaev9 years ago

I think it should be possible to remove default "admin" user. It might be a good idea for security reasons.

fnobre9 years ago

Well, yes you have a point. But the problem of the "suicide admin" remains(which is a different security problem: you delegate to someone the job of managing devices, but he has the power to "destroy" the system). Some other simple ideas that would be easy to implement at this stage of the interface/database structure:
1- Before deleting an admin, check the admin-count, if =1, do not delete.
2- Create another usertype, the "superadmin". This one could be unique and dedicated to more technical management tasks, and could not be deleted. I think this is a better idea, although more complex to implement, so the suggestion 1 could be a temporary solution before you evolve to a more elaborated user/permission management in Traccar.

Regards

fnobre9 years ago

Hi again Anton,

As I think better about the user issue, I want to adjust my suggestion to the following:
1- All users should be able to self-delete. If they can self-register, they should have an option to self-delete. Just add a [delete my account] option to the user-menu.
2- Admins can delete users but not other admins. To delete an admin, he must self-delete.
3- The last remaining admin must not have the ability to self-delete.

The above is interface/code only changes with no new tables/fields.

But all this is less of a priority than my original suggestion of "global option to remove device management for non-admins"

Best regards

Anton Tananaev9 years ago

I will think about it, but it's definitely going to be lower priority that many other things.

dsshir9 years ago

Wow, just installed and was about to request this feature, hope it gets implemented soon.

Chrisp8 years ago

Hi,
Just installed your product, it's awesome !!!

I hope too that this feature will implemented soon :)

Anton Tananaev8 years ago

For any feature request and voting for new features, it's better to use github:

https://github.com/tananaev/traccar/issues