Add basic user management for administrators #1

Merged
merged 65 commits into from May 15, 2013

2 participants

@adobo

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

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.

@pitbulk
OpenMOOC member

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

@adobo

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

@adobo

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.

@pitbulk
OpenMOOC member

You are right, my fault.

adobo added some commits May 8, 2013
@adobo adobo Refactor mail settings 094f53d
@adobo adobo Use Util::sendEmail wrapper everywhere instead of raw Mailer 08090ab
@adobo adobo Add initial support for multivalued attributes b10724c
@adobo adobo Rename JS file 4b68b14
@adobo adobo Make multivalued attributes UI work 386b63d
@adobo 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
@adobo adobo Add initial support for storing multivalued attributes
Now multiple values for an attribute are accepted and stored as expected
9e349a8
@adobo 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
@adobo 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
@adobo 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
@adobo adobo Show registration steps hint on top
Shows a wizard-like layout on top, showing the remaining steps before user
is actually registered
8ea58ec
@adobo adobo Show a link to 'Lost my password' when registering an already used email 7444b92
@adobo adobo Use appropriate titles on each step
Some steps did not have a title. Now all of them have it
f238283
@adobo adobo merged commit 3716190 into master May 15, 2013
@adobo adobo deleted the manageusers branch May 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment