def can_update_root(self):
        if self.is_readonly:
            return False
        if self.is_admin:
            return True

        return False
For truth value testing.
dataset/ETHPy150Open open-cloud/xos/xos/core/models/user.py/User.can_update_root--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Django-1.6.10/django/utils/tree.py/Node.__bool__