bug #3370: Fix error message for role actions in pending state

(cherry picked from commit 4d8d9e149d2688c4d73bf48cb95fe9fba4b3bfb7)