[Fix bug 997275] Add dynamic groups to PermissionMixin.
PR update.
Merge pull request #755 from johngian/fix-metrics-permissions

[Fix bug 997275] Add dynamic groups to PermissionMixin.