Skip to content

Instantly share code, notes, and snippets.

@rickx1
Last active April 26, 2020 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rickx1/e933a743752e0533e5b165a404aa6f52 to your computer and use it in GitHub Desktop.
Save rickx1/e933a743752e0533e5b165a404aa6f52 to your computer and use it in GitHub Desktop.
This code will display the distinguished name of a group or user in the interface instead of the display name. Store these files as snippets in your browser developers tools and run them when needed.
// Restore the original function, showing the display name
if ( acceUtil ) {
if ( acceUtil.originalGetSecurityPrincipalDisplayName ) {
acceUtil.getSecurityPrincipalDisplayName = acceUtil.originalGetSecurityPrincipalDisplayName;
console.log("Showing the principals display name");
}
}
// Shows the principals distinguised name in ACCE
if ( acceUtil ) {
if ( !acceUtil.originalGetSecurityPrincipalDisplayName ) {
acceUtil.originalGetSecurityPrincipalDisplayName = acceUtil.getSecurityPrincipalDisplayName;
}
acceUtil.getSecurityPrincipalDisplayName = function(name) {
// Change this value to show more (or less) parts:
var partsToShow = 3;
return name.match(/([^,]+)/g).slice(0,partsToShow).join(',');
}
console.log("Showing the principals distinguished name");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment