Politifact – partisan?

So, not entirely happy with the new Australian Politifact.  I’ve seen reports of the US version being politicised, including this (rather partisan) post on the general matter of fact checking sites in the last US election. (HT: Kiwiblog).  I had a little worry about the fact that Politifact Australia was being set up by a guy who used to run the Sydney Morning Herald, which has a noted left wing editorial line.

I was looking at the Australian site yesterday after a day of claim and counter-claim around the budget.  I perhaps expected that there would be some coverage of “the $70B black hole” in the Coalition budget plans, amongst other topics.  I’d seen some earlier analysis on the site, and reserved judgement – it was neither great nor dreadful.

Looking at the latest few posts, I’m quite concerned.  I think it’s really important that a fact checking site be clearly and obviously non-partisan, and it doesn’t look that way at the moment.

Continue reading

Rails, Cancan and Rolify: instance based access control

I’ve been working on instance-based access control using rolify and Cancan.  It took me a while to work out what’s happening here, so I thought I’d share it.

Rolify is a Gem that provides a roles database table, and also some methods that hook on to your models and users.  Cancan is an access control mechanism that hooks into your controllers, and checks whether users have been granted access to the operations they’re attempting to perform.

My first misconception was imagining that Rails goes to the database, gets a list of objects, and then calls through to Cancan to say “can this user access this object.”  This mental model caused a lot of misunderstandings for me.

Continue reading