Issue #2061971 by naveenvalecha, herom, InternetDevels: Replace user_access() calls with ->hasPermission() in block module.