Recently I had to use a website which stored things like user role (user or admin) in a cookie.
When I modified the username the displayed username changed in the website.
I immediately asked the developers of said website if it's secure to store the user role in a cookie if you can just modify it. They told me that you could only break the UI of said website and that the back-end always checks the session cookie for important actions.
So let's say I want to build my own website and store things like user-type: admin or user in a cookie.
Is it safe to store the user type in a cookie if it's only used for UI purposes and not back-end purposes?