Merge pull request #758 from jrogelstad/21289

issue #21289: Fix a multitude of problems that prevented personal privil...
issue #21302: Extensions need to consider roles too. Performance tweak.
Merge pull request #759 from jrogelstad/21302

issue #21302: Extensions need to consider role.