Groups created by Admin can be deleted by users.

Traveler2 years ago

I create a new group as Admin and connect some users to the group. All the users can see each other's their devices when they login. However any user can choose to delete the group. In this case the group gets deleted. Is this the intended behavior.

I wanted to create some group and add some users so that they could see each other when they login. However they should not be able to delete the group. They could choose to leave the group but not delete it. Is this possible? We keep organizing events where some users get together and go on a road trip etc. Using the group they could see each other on the map.

Anton Tananaev2 years ago

It is intended behavior. If you don't want people to change the group, the only option currently is readonly user.

Traveler2 years ago

Thanks Anton. So we need to tell them not to delete the group till the event is over. No worries. Thanks

Traveler2 years ago

Another thing I noticed, not sure if it is a bug. Steps to reproduce.

  1. As admin create a Group.
  2. As admin connect a user to this new group.
  3. Login as user and delete this new group that was created by admin.
  4. Log in back as admin user. Check Groups and the newly created group is no longer there since it was deleted by the user.
  5. Now still as an admin user go to settings->users option and try connecting any user to a group. In that group dropdown the name of the deleted group still appears and allows you to connect the user to the group although the group no longer exists.
Anton Tananaev2 years ago

What version of Traccar are you using? It does sound like a bug, but most likely it's just some caching in the browser.

Traveler2 years ago

I am on 5.12. The Traccar Manager App on Android also shows the same deleted group names in the dropdown.

Traveler2 years ago

So I cleared the complete browser cache, cookies, history, images et'al. The issue is definitely still present.

Anton Tananaev2 years ago

It probably means that the group was not removed for some reason. Do you see it in the database?

Traveler2 years ago

I will check it tomorrow, but if I create a new group with the same name again, then it is created successfully. I can then again delete that group as a User and then I get two groups with the same name in the drop down.

If the group wasn't deleted the first time then it shouldn't have let me create a new group with the same name I guess.

Anton Tananaev2 years ago

Names are not unique.

Traveler2 years ago

I just checked the database. It shows all the groups that were created by the admin and deleted by the user.

However when the admin creates and deletes a group then it is deleted in the database also.

So I guess you know where to look for the issue now.

Can I delete these groups directly from the database. Will it impact anything else. I am not using these groups anywhere.

Anton Tananaev2 years ago

No, I don't. It works for me just fine. Do you have clear steps to reproduce it starting from a clean server?

Traveler2 years ago

I tried it today morning and now it works fine. Only thing I did was clean up the database and removed all the duplicate groups and then tried again. Now it works as intended. Thank you for your support. If I am able to replicate again I will let you know. At one time I had 5 deleted groups all with the same name appearing in dropdown, so there was something definitely there but after cleaning the groups it okay now.