'Raise `frappe.PermissionError` if not permitted'

def check_permission(self, permtype=u'read', permlabel=None):

    if (not self.has_permission(permtype)):
        self.raise_no_permission_to((permlabel or permtype))
