added a haspermission function

given a permission type, it will return true or false stating if the
item has that permission