if you render your page with JS and need to implement a security feature, it comes down to something such as this:
var userID = getUserID();
if (userID == 1) {
html += renderDeleteButton();
}
But won't the user be able to just open the debugger and change the value of userID ?