Look at line 315 I have added it there, so it checks if user has one or other model permission and model permissions is the place where to check whether user is a super user or not.