Added role/permission id/string check
Reformatted code
Added dashboard widget method to decide when a widget is visible