Remove direct dependacy on ldap_schemas.

This means the ldap_schema can be configured properly using the
datastore.

Change-Id: Iac978af468ac0854025f7108e94d4530e28b83bd
Make ldap_schemas.py non-configurable

Until demonstrated it needs to be changed for each site.

Also change the names of the schema clases and support 389 dirserv.

Change-Id: Iddada5984e62497cd4eaf9b4226ddb1351e66d74
Fix logic when datastore changed.

When the datastore changes for MachineCategory, we always have to
remove all accounts from the old datastore and add then to the new
datastore, even if that MachineCategory is always in use. This is
because the accounts are always specific to a given machineCategory.

Change-Id: I7d88749ea7d06978758ed54371c8f6e515835ef7
Fix errors is user views.

Change-Id: Ifbfd7e2cf7dce679c94dd9b0403fb8c7299e43f5
Change the order of save() functions.

1. Save the db model. Make sure this saves ok without errors.
2. Update the datastore itself.
3. Update any datastore connections.

Otherwise we risk trying to update something that hasn't been created
yet.

Change-Id: Ic39ae7bb3c73e48c07810662dc73a442779fb831
Fix display of AUP policy link.

* Doesn't require autoescape being turned off in django-andsome.
* Fix spelling of image.
* If settings.AUP_URL not defined use reverse('aup') instead.

Change-Id: Ib0fe416437a7ae59bc0adaadd75bc83dce6748b9
Use ajax selects to select default_project.

Change-Id: I60ed06222511273289159ec0495b36ffc5ed7bf2
Display account as "username on machine_category".

Change-Id: I69cb14b03db4cc65b12d7ca2d80a3309c3902109
Log changed passwords.

Change-Id: I710d5eb71ed28ecd5cee39050ef2da22ff0ee104
Add comments.

Change-Id: I46bce911eef53fa5cb4373086ee66d0a527d8323
Fix account approval process.

We need to keep track of if the person is created and if any accounts
were created to properly inform the user.

Change-Id: I990d550061aafdbc728e16d68ce231fd4b18c1f2
Rename existing to existing_person for clarity.

Change-Id: I35a5b5de4ef02c1e9ad5b8f83676495f68775ebd
Add missing template context variables.

Change-Id: Ied6a949128e57fb3d66a2c93032df34c7ff3c2d1
Fix error.

Change-Id: Ic36ae6e51695d3b4ff6b0b59b5f8f693364231d4
Question should have a question mark.

Change-Id: If33a0fc65d4a527f9358d3438523798e2bbab7b0
Fix incorrect import.

Change-Id: Ibd5e78e52953da8fea21e7e7f015a0497cbf9914
Remove hardcoded example.org reference.

Change-Id: I92cfaa64ca4675101d3e69c74d4c5a6d4f9eec1e
Remove example template disclaimers.

If there is any reason these templates cannot be used for a generic
installation, this should be fixed.

Rather then forcing everyone to maintain a copy just to remove this
message.

Change-Id: I43aacd6a9e20c61681d425a4376526a513ecf266
Don't autoapprove if ADMIN_APPROVE_ACCOUNTS set.

Always require administrator to approve application if
ADMIN_APPROVE_ACCOUNTS is set, even if not creating accounts or
projects.

This is because extra work manual work may be required to add user to
project. Alternatively datastores may need to be updated, which are
only configured on the kgadmin not kgreg server.

Change-Id: I9831d79320f55a24890ebce6c6bb2ed7bc78d313
New state machine design for applications.

Should make it easier to customize for each site.

Lots of bugs fixed, including some potential security issues.

Improve working tests.

Documentation required.

Change-Id: I7116a3df7eed763a7e4a836471afef88c94237f1