test with permission deletion