@classmethod
def check_permission(cls, context):
    """
        Check if the request should be premitted.
        Raises an appropriate exception if the request is not permitted.
        """
    for permission in cls.get_permissions():
        if not permission.has_permission(context, cls):
            cls.permission_denied(context)
