Add some funcs for dealing with permits