many changes
merged
only records user hasaccess to are visible
fixed role checking bug