Issue #2811273 by rjacobs, gisle: Updates for compatibility with new permissions in core 7.50 and file_entity.