def has_perm(self, username, perm, path=None):
        """check user permission
        """
        account = self.get_account(username)
        return account and account.has_perm(perm, path)
check user permission