Check entry_class before checking permission. bugid:112346