Issue #23574 - check for selection before attempting to add or revoke a role

When adding or revoking a privilege, the code verifies that a privilege has been selected before running the SQL function.  It does not do that check when adding or revoking a role.  This change adds those checks.

I do not know why the commit has changes for the openrpt and csvimp submodules.  This is the first time I've seen this happen with these submodules, or what these changes mean.  I don't know if this is problematic, but if it is, and there are git commands that I can run to remove these changes from the PR, please let me know what they are and I will run them.  If you can run them and take care of it, that would be preferable, but if that's not possible I'll do my best to take care of it.