moving permissions structs to proto.