With the help of this module we can add below field to generate country, state and city drop-down in our content type.
This module have latest data like ... We have 247 country, 4,851 States/Regions and 1,15,547 city.

BENEFITS
--------
This module add 3 below field type :
1) country state city type
When user added this field type in any content type then while adding or
editing choose the country, the state field is showed, than, when user
select the state, the city field is showed.

2) country state type

When user added this field type in any content type then while adding or
editing choose the country, the state field is showed.

3) country only

User can add this filed if they want only country drop-down.

Project page

https://www.drupal.org/project/country_state_city

Git instructions

git clone --branch 8.x-1.x https://git.drupalcode.org/project/country_state_city.git

PAReview checklist

https://pareview.sh/pareview/http-git.drupal.org-project-country_state_city

Comments

arunkumarkit created an issue. See original summary.

avpaderno’s picture

Issue summary: View changes

Thank you for applying! Remember to change status, when the project is ready for review, as in this queue Active means Don't review yet the project I am using for this application.

arunkumarkit’s picture

Hi @kiamlaluno

Thanks for your reply.

Now I have change the status, Please check and let me know if have any concern.

klausi’s picture

Status: Active » Fixed
  1. CityListAccessControlHandler::checkAccess(): do not use \Drupal::currentUser() to check for access. Use the passed in $account object. That is the one that the access check should be performed on. Please check all your access controller methods to not use the global user if possible.
  2. There are quite a few doc blocks that read "Undocumented function.". Please add proper comments to all your methods.
  3. class CountrySettingsForm: the docblock just repeats the class name which is not useful. Please describe what the class is used for and why. Please check all your doc blocks.

Otherwise looks good to me.

Thanks for your contribution, Arun!

I updated your account so you can opt into security advisory coverage now.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

avpaderno’s picture

Status: Fixed » Needs work

Given that this application has never been set to Needs work and that given access to a user who would not have it is a serious issue, the OP is required to make the changes reported in the previous comment, since that is a misuse of Drupal API.

klausi’s picture

An application does not have to be set to "needs work" if there is nothing blocking approval :-)

Using the global user is bad, but I do not see a security issue in this case because it cannot be exploited.

Anyway, @arunkumarkit please fix the mentioned issues and then we can approve this for real.

avpaderno’s picture

The issue is that what checkAccess() implemented from an access control handler gets as argument is not necessarily the user object for the currently logged-in user. If the code assumes that, and uses the value returned from \Drupal::currentUser() instead of the argument it gets, it will check the access for the wrong user object. This is as wrong as checking for the wrong user permission.

arunkumarkit’s picture

Hi @kiamlaluno

I have done changes as suggested... Could you please check and confirm.

Thanks

avpaderno’s picture

Status: Needs work » Fixed

The change is fine, for me. See comment #4 for the other suggestions, which (by themselves) aren't reasons to keep the status on Needs work.

avpaderno’s picture

Assigned: Unassigned » avpaderno

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.