In the method permission_denied, did not use the request parameter.

I made some changes that about permissions. Please review. Thx