Fix code if no SecurityContext is set
Merge branch 'sonata/master'