You can stuff the logic of "who can do what" somewhere else. eg:
var permissions = { "Superadmin": ["selfdestruct",...], "Admin": ["ban",...], "Plebe": ["post",...] };
function roleCanDo(action, role) { return permissions[role].indexOf(action) > -1; }
Your check would look like: if (roleCanDo("someaction", user.getRole()))
Sorry if JS isn't your thing.