Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change devicelimit userlimit permission to match with LDAP #4834

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rushdimohamed09
Copy link

When you are linking traccar to an external system when LDAP is enabled, automatically the devicelimit and userlimit is set to 0, which leads the user cannot create any user and well as add any devices. You will need to log to traccar via the UI and manually change the limits in order to create a user or add a new device.
So I have made the changes the default value as -1 for devicelimit and userlimit on User.java.

@tananaev
Copy link
Member

You're basically making users managers by default. I don't think it's a good idea.

@rushdimohamed09
Copy link
Author

The issue I encountered is when LDAP is enable and integrating Traccar to another system. We are not able to add any new devices using the APIs. Thus devicelimit is autoset to 0. So to add a new device we have to login to traccar UI and then change the devicelimit. That is a violation of integration, it makes pointless of the API. As the system is not having user/group search option APIs. If this option was there, then changing the user permissions will not be required.
So its like if we can have two new APIs such as filter user by username and filter group by groupName would be more advisable.

@tananaev
Copy link
Member

For the device limit should use logic like this instead:

https://github.com/traccar/traccar/blob/master/src/main/java/org/traccar/api/resource/UserResource.java#L78

As for other concerns, they don't seem to be related to this PR. Happy to discuss separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants