Question: Limiting computed attributes

Dear Anton,

I think currently there is no possibility for the limited computed attributes.
It's needed because everyone don't have knowledge about the JEXL.
So, it would be better if we limit them just like limit commands feature. Or I misunderstood something?

Anton Tananaev6 years ago

What exactly do you want to limit?

i.e. If an admin created a computed attribute then only assign it to another user or manager and they won't be able to delete and modify it.

Anton Tananaev6 years ago

It should already be the case for read-only user, but I don't think we need a special flag just for computer attributes.

Yeah, I also think so but it's creating problem because it's like a programmable thing and even manager level user are not able to create it.
And the one main problem is that if we assign a single attribute to different managers and anyone of them deleted or modified it then it will apply on all of them.
So, Would it be better that admin will create and assign to managers? What's your opinion?

Anton Tananaev6 years ago

Same applies to everything else (calendar, geofences etc).

So, any solution in your mind? The only solution is to create manager and then again create all set of rules for each of them by their account. Then they can assign all objects to their standard read only users. But it's quite lengthy and redundant thing.

abyss6 years ago

If you want just compute attribute, admin can link Computed Attribute to the Device, result will be computed and placed in position attributes, but no one can modify Computed Attribute object itself.

But AFAIK admin can only see their devices into the Web panel and if we will go with this approach then admin will have to do all the work even for manager level devices.

Anton Tananaev6 years ago

Manager can probably do the same thing.

The problem remains the same. I only want to create some attributes from the admin and then he can assign to all the managers but don't want them to create their own.
I have one more solution in mind but by that way manager can also create own attributes irrespective of the fact that admin had already assigned some attributes to him.
And I don't think it's bad.

So,

We can create a model having userId (The one who create it) field only and extend all objects like Geofences, Attributes, Notifications, Calenders etc. from it.
And it will be a simple check (for delete and update ) into the Permission manager that whether he created it or not unless he is an admin ( or manager in which their standard user created it).
Is it right approach?

Kindly help me to choose from one of them. Only want them to restrict delete and modify operation for the shared property.

Anton Tananaev6 years ago

Permissions system is already pretty complicated, so adding notion of owner will make it even more complicated.

I know but could you please tell me that should I follow this approach because this is an urgent requirement for me or any other solution in your mind other than this approach? I do want to follow the Traccar approach for future compatibility. I think it would be better to implement this rather than limiting property.

Anton Tananaev6 years ago

If you want maximum compatibility you can just implement some logic to check if attribute is linked to admin, not allow anyone else to change them.

Oh wow, Thank you very much Anton.
All problems got resolved because at standard user level we can define them read only users. And also it can be handle via a simple switch in server model or into the config property to make this feature enable or disable.

Thanks again.