Skip to content

Instantly share code, notes, and snippets.

View willww64's full-sized avatar

Will Wang willww64

View GitHub Profile
def isAuthenticated(User u) {
try {
return u.impersonate().isAuthenticated()
}
// Users pulled from SCM history e.a. are not GUI users
catch (org.acegisecurity.userdetails.UsernameNotFoundException xc) {
return false
}
}