Please add a test to check cases where permission check fails.