Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Add basic user management for administrators #1

Merged
merged 65 commits into from about 1 year ago

2 participants

Jorge López Pérez Sixto Martin
Jorge López Pérez
adobo commented

This PR features two new pages for admins:

  • Add new user (no verification needed)
  • Search users, edit and delete them

Note that some configuration changes are needed, just have a look at the configuration file template.

Aside from that, it also shows a 'Resend verification email' link when someone tries to register an already created account that hasn't been verified yet.

adobo added some commits
Jorge López Pérez adobo Add 'Create user' page for admins ae90f69
Jorge López Pérez adobo Hide admin section title for non-admin users a149eb0
Jorge López Pérez adobo Add basic user search interface 83d8e9f
Jorge López Pérez adobo Add searchUsers method to LDAP storage class 6957671
Jorge López Pérez adobo Make the search form actually search for users ae70a29
Jorge López Pérez adobo Fix translations 2947733
Jorge López Pérez adobo Add some more translations 04fa3b7
Jorge López Pérez adobo Change button size 6bd3d9f
Jorge López Pérez adobo Return user id attribute when searching for users
Generate modify and remove links
9930e02
Jorge López Pérez adobo Trim search pattern ba7bb97
Jorge López Pérez adobo Let administrator remove users f15e7af
Jorge López Pérez adobo Show admin links even when current user is not logged as an admin user a8a89bb
Jorge López Pérez adobo Use SSP URL helper methods da2ebea
Jorge López Pérez adobo Rework the whole layout system 7e978f3
Jorge López Pérez adobo Fix debug message on LdapMod 122c04b
Jorge López Pérez adobo Add initial support for modifying users 5021f32
Jorge López Pérez adobo Add functional 'Edit user' for admins 2c6414c
Jorge López Pérez adobo Fix i18n message dc6f4f9
Jorge López Pérez adobo Fix warning when passwords don't match after receiving user token 4d2df45
Jorge López Pérez adobo Add a 'Resend verification email' link when someone tries to register…
… an already taken uid but hasn't verified it yet
b20b7a5
Jorge López Pérez adobo Use a more friendly text for 'Resend verification token' d6b3061
Jorge López Pérez adobo Fix indentation. Add some documentation regarding valid sections e8d3754
Jorge López Pérez adobo Honour read only setting ac48373
Jorge López Pérez adobo Fix read only fields when creating a new user 74e981c
Jorge López Pérez adobo Reindent Validation.php d19f680
Jorge López Pérez adobo Specify the user id that was just created 30919d5
Jorge López Pérez adobo Remove mentions to admin.additional_attributes 46c670a
Jorge López Pérez adobo Add a checkbox to send an email to the user after the account creatio…
…n. Still not functional
b0ba878
Jorge López Pérez adobo Send email with user account details 4341ec8
Jorge López Pérez adobo Add links to admin actions after creating a new account 3d45ab9
Jorge López Pérez adobo Add cancel button to account modification page for admins f646f0d
Jorge López Pérez adobo Change 'sendemail' text 596172e
Jorge López Pérez adobo Use literal attribute names if they were not included in config file e0aa06c
Jorge López Pérez adobo Enforce password policy when creating an account 51b2f11
Jorge López Pérez adobo Enforce password policy when modifying an user 21828bd
Jorge López Pérez adobo Rename two admin templates for consistency 071146f
Jorge López Pérez adobo Add option to auto generate passwords d2d5298
Jorge López Pérez adobo Add missing JS file dd18950
Jorge López Pérez adobo Fix a problem with special characters on searches a5dfb09
Jorge López Pérez adobo Show admin links even when not logged in ed827f4
Jorge López Pérez adobo Encrypt userPassword using configured algorithm 1ba64d0
Jorge López Pérez adobo Add eduPersonAffiliation to forms (still not functional) 20f4ea6
Jorge López Pérez adobo Add affiliations when creating a new user d91aade
Jorge López Pérez adobo Do not encrypt passwords twice eba0819
Jorge López Pérez adobo Add option to specify a minimum search string length a703a5b
Jorge López Pérez adobo Add new filter option to configure how search should work 05aa20c
Jorge López Pérez adobo Add a checkbox to send user account details to user after modifications caa9b76
Jorge López Pérez adobo Add missing mail template e6b9609
Jorge López Pérez adobo Make searchable attributes configurable 7e61240
Jorge López Pérez adobo Add result pagination support (configurable) 08408c9
Jorge López Pérez adobo Remove unused file 88a241d
Jorge López Pérez adobo Move comment about layout settings above its definition 82c1dda
Sixto Martin
Collaborator

I found a bug, Im an admin and I created a new user.
The user recieved the email with the credentials but when he tries that credential, the log in failed.

I checked the user entry at the phpldap admin and seems that the password was not stored.

Sixto Martin
Collaborator

When the prevous bug is fixed, merge this branch in master.

Also create a doc file with the changes that must be set in the module_userregistration.php

Jorge López Pérez
adobo commented

Can't reproduce this bug. Can you provide your current module_userregistration.php configuration file?

Jorge López Pérez
adobo commented

After examining your configuration file, seems that the definition for the userPassword attribute is commented, so the module doesn't know how to write it to the LDAP server.

Sixto Martin
Collaborator
pitbulk commented

You are right, my fault.

adobo added some commits
Jorge López Pérez adobo Refactor mail settings 094f53d
Jorge López Pérez adobo Use Util::sendEmail wrapper everywhere instead of raw Mailer 08090ab
Jorge López Pérez adobo Add initial support for multivalued attributes b10724c
Jorge López Pérez adobo Rename JS file 4b68b14
Jorge López Pérez adobo Make multivalued attributes UI work 386b63d
Jorge López Pérez adobo Changed sample eduPersonAffiliation validate value
Accepting an array for this attribute requires the flag 'FILTER_REQUIRE_ARRAY' as
a 'flag' key inside the validate array
8d2310c
Jorge López Pérez adobo Add initial support for storing multivalued attributes
Now multiple values for an attribute are accepted and stored as expected
9e349a8
Jorge López Pérez adobo Sanitize values: remove repeated and empty ones
Values are uniq'ed() and empty elements are just removed. This solves some
LDAP issues with them
7f53519
Jorge López Pérez adobo Add massive remove option
A checkbox on each row lets you choose which users you want to be removed.
After choosing as many as you want, just click on the 'Remove selected users'.

A confirmation page is shown too.

There is some work still to do, mainly related to UX:

* A checkbox to select/unselect all the rows
* Disable the button when no rows were selected
8d5351f
Jorge López Pérez adobo Reorganize steps order
Code was really messy and difficult to read. Now the different
steps/stages can be found in reverse order (from stage 4 to stage 1)
811d482
Jorge López Pérez adobo Show registration steps hint on top
Shows a wizard-like layout on top, showing the remaining steps before user
is actually registered
8ea58ec
Jorge López Pérez adobo Show a link to 'Lost my password' when registering an already used email 7444b92
Jorge López Pérez adobo Use appropriate titles on each step
Some steps did not have a title. Now all of them have it
f238283
Jorge López Pérez adobo merged commit 3716190 into from
Jorge López Pérez adobo closed this
Jorge López Pérez adobo deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 65 unique commits by 1 author.

Feb 26, 2013
Jorge López Pérez adobo Add 'Create user' page for admins ae90f69
Feb 28, 2013
Jorge López Pérez adobo Hide admin section title for non-admin users a149eb0
Mar 08, 2013
Jorge López Pérez adobo Add basic user search interface 83d8e9f
Mar 11, 2013
Jorge López Pérez adobo Add searchUsers method to LDAP storage class 6957671
Jorge López Pérez adobo Make the search form actually search for users ae70a29
Jorge López Pérez adobo Fix translations 2947733
Jorge López Pérez adobo Add some more translations 04fa3b7
Jorge López Pérez adobo Change button size 6bd3d9f
Jorge López Pérez adobo Return user id attribute when searching for users
Generate modify and remove links
9930e02
Mar 12, 2013
Jorge López Pérez adobo Trim search pattern ba7bb97
Jorge López Pérez adobo Let administrator remove users f15e7af
Jorge López Pérez adobo Show admin links even when current user is not logged as an admin user a8a89bb
Jorge López Pérez adobo Use SSP URL helper methods da2ebea
Mar 14, 2013
Jorge López Pérez adobo Rework the whole layout system 7e978f3
Jorge López Pérez adobo Fix debug message on LdapMod 122c04b
Jorge López Pérez adobo Add initial support for modifying users 5021f32
Mar 15, 2013
Jorge López Pérez adobo Add functional 'Edit user' for admins 2c6414c
Jorge López Pérez adobo Fix i18n message dc6f4f9
Mar 18, 2013
Jorge López Pérez adobo Fix warning when passwords don't match after receiving user token 4d2df45
Jorge López Pérez adobo Add a 'Resend verification email' link when someone tries to register…
… an already taken uid but hasn't verified it yet
b20b7a5
Mar 22, 2013
Jorge López Pérez adobo Use a more friendly text for 'Resend verification token' d6b3061
Mar 26, 2013
Jorge López Pérez adobo Fix indentation. Add some documentation regarding valid sections e8d3754
Jorge López Pérez adobo Honour read only setting ac48373
Jorge López Pérez adobo Fix read only fields when creating a new user 74e981c
Jorge López Pérez adobo Reindent Validation.php d19f680
Jorge López Pérez adobo Specify the user id that was just created 30919d5
Jorge López Pérez adobo Remove mentions to admin.additional_attributes 46c670a
Jorge López Pérez adobo Add a checkbox to send an email to the user after the account creatio…
…n. Still not functional
b0ba878
Mar 27, 2013
Jorge López Pérez adobo Send email with user account details 4341ec8
Jorge López Pérez adobo Add links to admin actions after creating a new account 3d45ab9
Jorge López Pérez adobo Add cancel button to account modification page for admins f646f0d
Jorge López Pérez adobo Change 'sendemail' text 596172e
Jorge López Pérez adobo Use literal attribute names if they were not included in config file e0aa06c
Jorge López Pérez adobo Enforce password policy when creating an account 51b2f11
Jorge López Pérez adobo Enforce password policy when modifying an user 21828bd
Jorge López Pérez adobo Rename two admin templates for consistency 071146f
Mar 29, 2013
Jorge López Pérez adobo Add option to auto generate passwords d2d5298
Apr 01, 2013
Jorge López Pérez adobo Add missing JS file dd18950
Jorge López Pérez adobo Fix a problem with special characters on searches a5dfb09
Apr 03, 2013
Jorge López Pérez adobo Show admin links even when not logged in ed827f4
Jorge López Pérez adobo Encrypt userPassword using configured algorithm 1ba64d0
Jorge López Pérez adobo Add eduPersonAffiliation to forms (still not functional) 20f4ea6
Apr 04, 2013
Jorge López Pérez adobo Add affiliations when creating a new user d91aade
Apr 09, 2013
Jorge López Pérez adobo Do not encrypt passwords twice eba0819
Apr 26, 2013
Jorge López Pérez adobo Add option to specify a minimum search string length a703a5b
Jorge López Pérez adobo Add new filter option to configure how search should work 05aa20c
Jorge López Pérez adobo Add a checkbox to send user account details to user after modifications caa9b76
Apr 27, 2013
Jorge López Pérez adobo Add missing mail template e6b9609
Jorge López Pérez adobo Make searchable attributes configurable 7e61240
Apr 29, 2013
Jorge López Pérez adobo Add result pagination support (configurable) 08408c9
Jorge López Pérez adobo Remove unused file 88a241d
Jorge López Pérez adobo Move comment about layout settings above its definition 82c1dda
May 08, 2013
Jorge López Pérez adobo Refactor mail settings 094f53d
Jorge López Pérez adobo Use Util::sendEmail wrapper everywhere instead of raw Mailer 08090ab
Jorge López Pérez adobo Add initial support for multivalued attributes b10724c
May 09, 2013
Jorge López Pérez adobo Rename JS file 4b68b14
Jorge López Pérez adobo Make multivalued attributes UI work 386b63d
Jorge López Pérez adobo Changed sample eduPersonAffiliation validate value
Accepting an array for this attribute requires the flag 'FILTER_REQUIRE_ARRAY' as
a 'flag' key inside the validate array
8d2310c
Jorge López Pérez adobo Add initial support for storing multivalued attributes
Now multiple values for an attribute are accepted and stored as expected
9e349a8
May 10, 2013
Jorge López Pérez adobo Sanitize values: remove repeated and empty ones
Values are uniq'ed() and empty elements are just removed. This solves some
LDAP issues with them
7f53519
Jorge López Pérez adobo Add massive remove option
A checkbox on each row lets you choose which users you want to be removed.
After choosing as many as you want, just click on the 'Remove selected users'.

A confirmation page is shown too.

There is some work still to do, mainly related to UX:

* A checkbox to select/unselect all the rows
* Disable the button when no rows were selected
8d5351f
May 13, 2013
Jorge López Pérez adobo Reorganize steps order
Code was really messy and difficult to read. Now the different
steps/stages can be found in reverse order (from stage 4 to stage 1)
811d482
Jorge López Pérez adobo Show registration steps hint on top
Shows a wizard-like layout on top, showing the remaining steps before user
is actually registered
8ea58ec
Jorge López Pérez adobo Show a link to 'Lost my password' when registering an already used email 7444b92
Jorge López Pérez adobo Use appropriate titles on each step
Some steps did not have a title. Now all of them have it
f238283
Something went wrong with that request. Please try again.