added possibility to set a permission on the segment object, fix category of deviceType