'how to prevent privilege escalation by changing HTTP response values?

i want to know how to mitigate privilege escalation by changing the response values,

for example in response body: isAdmin=false

change it to

isAdmin=true

and get the privilege



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source