Some apartment buildings have fire codes that prohibit firearms in apartments. Some other apartments have bans on firearms that the owner can't overrule. But it's better to check with your landlord or management before storing a firearm in your apartment.