At the time the second amendment was written? Adult, white, male citizens. The same individuals who (according to the Militia Act of 1792) qualified to be in the Militia.
The U.S. Constitution, Article I, Section 2 says, "The House of Representatives shall be composed of members chosen every second year by the people of the several states ..." (my underline).
In 1792, who voted? Adult, white, male citizens. They were "the people". They had full rights.
Today, we have extended the protection of full rights to women and non-whites. They are now included in "the people".