replace all lookups of restrict_superuser with optimized call

to a function that caches it for 5 seconds