Issue #2062009 by InternetDevels: Replace user_access() calls with ->hasPermission() in overlay module.