When i try to use the module for anonymous users i can see that the password policy is not applied when anonymous user try to register.

I'm attaching a patch that handle it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RoySegall’s picture

hefox’s picture

Wonder if it'd be better to instead do an it on the element basis (e.g. add a process to 'pass' element?

hefox’s picture

Title: Apply the password policy for anonymous users » Apply the password policy for anonymous users/user creation

doesn't work with creating new users either, patch fixes that

coltrane’s picture

Issue summary: View changes
FileSize
4.08 KB

Updated patch with a simpletest.

Status: Needs review » Needs work

The last submitted patch, 4: 2041717-policy-anonymous-users-4.patch, failed testing.

The last submitted patch, 4: 2041717-policy-anonymous-users-4.patch, failed testing.

coltrane’s picture

Status: Needs work » Needs review
FileSize
4.74 KB

Updated patch handles exception.

RoySegall’s picture

@coltrane What's different?

coltrane’s picture

#4 adds a simpletest test for user registration and #7 handles an exception which you can see on the simpletest run results at https://qa.drupal.org/pifr/test/678473

Edit, so your patch is perfect, this just adds a test to confirm it :)

erikwebb’s picture

Status: Needs review » Fixed
RoySegall’s picture

I know it's perfect :) i just don't understand why in #4 it failed and on #7 it's failed.

Status: Fixed » Closed (fixed)

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

pinkonomy’s picture

I used the 7.x-2.x-dev of this module but I cannot see under roles the anonymous user.
Am I missing something?
thanks

tanc’s picture

I have the same problem as pinkonomy, there is no option to apply the policy to the anonymous user, so I think the policy would only trigger if you don't have any roles selected (which would then apply it to all roles including anonymous).

tanc’s picture

Status: Closed (fixed) » Needs review
FileSize
806 bytes

The simple solution is to allow anonymous users when loading the options form in password_policy_role_admin_form. Attached is a patch which does this.

Status: Needs review » Needs work

The last submitted patch, 15: 2041717-allow_anon-15.patch, failed testing.

tanc’s picture

FileSize
622 bytes

Adding a new patch that should apply fine, last one was from the wrong directory.

tanc’s picture

Status: Needs work » Needs review
deekayen’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

corwino’s picture

Here's an up-to-date patch to be able to select the 'Anonymous' role when creating a policy.