User accounts and devices

soapacup8 years ago

I just found you yesterday, tried Windows 7, too much hassle with firewall and NAT, so I got a atlantic.net five dollar a month virtual server and was able to implement traccar in 30 minutes flat. But I don't want to give people the wrong impression, I've done a lot of EC2 and Digital Ocean bare metal vm. I even switched to MySql remote, works great. (i.e. not using 127.0.0.1 - sending to another server) works great.

User Accounts and devices

I did get confused when I changed the admin password, then I added a user, and the devices did not show up on the new user. I am not sure how you will implement this in the future, but I could live with only allowing new devices on an admin user, and a flag on devices for 'all users.' You might have something more sophisticated in mind, but I could live with something that simple.

The only form change would be on the device add form, adding a checkbox for 'all users.'

Admin only for "device add" could be a setting in /opt/traccar/conf/traccar.xml imho.

BTW, I am very impressed, and will be looking at the repository one of these days. I use netbeans every day, but not so much for java.

Thanks, great job

Anton Tananaev8 years ago

Can you please explain the issue in more details where devices didn't show up. If you created a new user, it won't have any devices assigned to it.

soapacup8 years ago

Exactly. I want the admin to assign the devices, and the regular old user to view them. I'm thinking that a simple little 'All Users' flag on device assignment.

I would also like to disable device assignment on non admin users.

Anton Tananaev8 years ago

This functionality is already implemented. You can set "readonly" flag in the server settings.

soapacup8 years ago

The only readonly I can find is on the user record, but it is not on the form entry. Don't see anything in traccar.xml either.

Anton Tananaev8 years ago

If you login as an admin user, go into Settings -> Server and you'll see a Readonly checkbox there.

soapacup8 years ago

I must not have the latest version. Yet it still works great. Hey, I saw something about kml files on a post from last May, 2015. That would be incredible.

My apologies on any version mixup on my part.

Anton Tananaev8 years ago

Do you mean export data into KML. That's not implemented yet, but it's definitely in plans.

soapacup8 years ago

OK, just went 3.1 to 3.3, very nice. Yes, export into KML, better yet, poll for the KML.

Example

I do a post to https://myserver.com/getrawkml (or http://myserver.com:8082/getrawkml)

post contains three or four items

api_key (or user and password)
deviceId
a single date in YYYY-MM-DD for example

but I would be pretty happy with whatever you decide to implement.

soapacup8 years ago

I couldn't get the devices to work for all users, even with readonly, so I used phpmyadmin to add the keys I needed to user_device.

I did have to stop and start the service, but now it is perfect, totally perfect.

that is, as root

/opt/traccar/bin/traccar stop

and

/opt/traccar/bin/traccar start

The only problem I was having was displaying history, but restarting the server fixed that.

Maybe I should have stopped and started the server after setting readonly, but before adding devices as admin? We'll see.

Anton Tananaev8 years ago

I will double-check if the readonly flag is updated without restart. It should be, but there might be a bug in the current implementation.

soapacup8 years ago

I just found that under settings->users you have a devices tab. Now that I'm running 3.3 that is. Perfect. While logged in as an admin, I use that to set the user_device table settings. That gives the admin total control over which devices a user account sees on their map. Elegantly done.

webo7 years ago

On this same topic, we have a couple admins and then just general users but it's a bit frustrating when they can't see each other's devices.

Is there a way to automatically let all users see all devices? It would be tedious for the admin to have to go to each user account and select the new device every time one is added.

Anton Tananaev7 years ago

You can have a group which both admins have access to. Then all you need to do is to specify that group when you add a new device.