Q:

Javascript modification security?

As my website depends a lot on Javascript, I would like to know: Is it possible for the user to edit .js files? Because this way they can delete condition checks and get access to stuff they shouldnt have. And mess the whole site. What is the chance of something like this happening and how to avoid it?

A:

No, the user cannot edit the js files. They can however edit the javascript returned from said files and execute as much additional javascript as they wish within the browser. anything you can do with javascript (in the browser), so can the client. This includes anything that is within a conditional that would have normally kept the user out of specific content that they aren't allowed to access.
Do not do security checks client-side, otherwise the client will be able to change said checks to gain access.

