You mean customize the message? No, we don't support it.
Hi Anton, the idea was that if a user was disabled and tried to log in, it would appear to him, for example: Contact finance.
@turbovix it's good idea, I think this option be a part of Traccar.
@Turbovix
Sounds easy, just need to modify your web template to 'interpret' unauthorized response from API, and display custom message you need.
@educracker explaining in words is easy. Can you provide a updated class that we require to change.
Thanks in advanced
@RastreameMX I don't believe this is the solution, since a message about the financial issue would appear for any user who was disabled regardless of the reason.
I think the correct way would be to have a field for a personalized message with the possibility of activating/deactivating it in each user account, and every time the user logs into the system a popup would show that message.
I have check the code and found this is possible to display the msg for disabled users.
Once it's ready I will share the ip.
I also required more options suggestions that we can implement on traccar.
Please share your idea what you want more on traccar.
@turbovix The way i gave you is one possible solution, not ideal, because it would work as "generic" unauthorized message.
Because the traccar api does not differentiate between "disable modes", the only way I can think of doing it is through one user flag on user attributes. And even with the flag, the tricky part is in how to "obtain" those attributes when the user is deactivated.
In our instance, we are currently doing some similar, displaying a message bar (yellow or red) to users that have some pending balance, it works using user's attributes where we place balance on each user, and type of message to display. But it is shown after user is authenticated. When the user is finally disabled, we show original "unauthorized" message.
Greets.
@Turbovix I have implemented the same in the bellow ip you can check here.
You also get the error msg for invalid userid or incorrect password.
disabled user login details
Id: company_1
password: company_1
Hello @Ashok, it turned out perfect. Can you share what you did?
You need to modify Login page.jsx and server code
Friends, is it possible to show a message to the disabled user when he tries to log in?