'Not Permitted' error on button fieldtype

i have a button fieldtype in my ‘Availability’ doctype called ‘add_schedule’, and in my py file, i have,

class Availability(Document):
    def add_schedule(self):
        self.validate_values()
        ...........
        ...........

It used to work, but after v13 update, i am getting ‘Not Permitted’ popup on button click. i think this is not related to role permission because i have enabled all the permissions for the doctype.

On console, i see the following error.
{my url}/api/method/run_doc_method 403 (FORBIDDEN)

Any clue what’s going wrong?