Some unix-style permissions stuff
Started changing permissions to be less UNIX-y and more practical
Finished refactoring underlying sharing/permissions model
Changed inner join to left outer join
Perf testing and fixed problem with auth not being generic
Fixed to_mask to deal with empty list of permissions
Rejigging auth checking
Made a method private
Added basic pagination