Add some tests for permissions controller/model and remove some code
Don't test repository enabled on attachment abilities