safer variant of #impersonate authentication that does not require a finally-block . concode_field_sep String SYSTEM_USERNAME concode_elem_sep Sid EVERYONE concode_elem_sep String ANONYMOUS_USERNAME concode_elem_sep Sid ANONYMOUS concode_elem_sep Sid[] AUTOMATIC_SIDS concode_elem_sep Authentication SYSTEM concode_field_sep void checkPermission concode_elem_sep void checkCreatePermission concode_elem_sep ACLContext as concode_elem_sep ACLContext as concode_elem_sep boolean hasCreatePermission concode_elem_sep boolean hasPermission concode_elem_sep boolean hasPermission concode_elem_sep String toString
void function ( @ Nonnull Authentication arg0 , @ Nonnull Runnable arg1 ) { SecurityContext loc0 = impersonate ( arg0 ) ; try { arg1 . run ( ) ; } finally { SecurityContextHolder . setContext ( loc0 ) ; } }