Commit Graph

205 Commits

Author SHA1 Message Date
Bharat Mediratta
a88b3f5808 Implement IdentityProvider_Gallery_Driver::admin_user() properly such
that it's not hardcoded to return the user with id 2.  Create
user::admin_user() which finds an appropriate admin and returns it.
Fixes #1358.
2010-09-11 00:47:48 -07:00
Bharat Mediratta
8a36c24f39 Fix some broken identity APIs:
- add_user_to_group and remove_user_from_group should take Group_Definition instances
  to be consistent
- add_user_to_group and remove_user_from_group in drivers/IdentityProvider.php should
  not be static
2010-09-06 18:20:46 -07:00
Bharat Mediratta
6d81feacae Change the key for invalid passwords from "invalid" to
"invalid_password" to remove ambiguity.
2010-04-17 12:28:46 -07:00
Bharat Mediratta
27b29afd7c Add user::valid_username() as a validation helper. 2010-04-17 12:26:52 -07:00
Bharat Mediratta
c3c2b45280 Update the copyright to 2010. It's only 3 months into the year :-) 2010-03-03 10:15:34 -08:00
Bharat Mediratta
7d98d4b7b9 Revert "Fix for ticket #491: Make user and group names translatable."
This reverts commit 4091219425.
2010-02-18 16:20:59 -08:00
Bharat Mediratta
99c131e845 Revert "Never assign a SafeString instance to a Model member (or hell will break loose)."
This reverts commit dcddc68f58.
2010-02-18 16:20:23 -08:00
Andy Staudacher
dcddc68f58 Never assign a SafeString instance to a Model member (or hell will break loose). 2010-02-15 13:12:38 -08:00
Andy Staudacher
4091219425 Fix for ticket #491: Make user and group names translatable.
Also fixed a UI bug: No longer showing the edit user buttons to admins in the profile view (to be consistent with the requirements in the controller).
2010-02-14 19:26:34 -08:00
Bharat Mediratta
6e1b761b12 Require the current password to change your password.
Fixes ticket #585.

Separate out the password change form from the regular edit user form.
Require the old password to enter a new one.  While I'm at it, roll
the password strength javascript into a Form_Script element so that we
can get rid of the old view (which incidentally fixes a bug where the
password strength meter would go away on form errors).
2010-02-02 21:36:01 -08:00
Bharat Mediratta
e1bf010d89 Force all non-guest users to have an email address since that's
required in model validation.  Without this, any save on a user
without email will fail which means that you can't log in.

Bump user module to version 3.
2010-01-31 20:50:52 -08:00
Bharat Mediratta
b6dab323ac Use ORM to create the users since now our validation can handle doing
it the right way.  Set a default email address for admins.
2010-01-25 20:42:48 -08:00
Bharat Mediratta
fecac4a859 Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
Conflicts:
	modules/gallery/tests/xss_data.txt
2010-01-23 16:29:10 -08:00
Tim Almdal
df313cac56 Change the check_environment method in the module helper and the module installers to can_activate to reflect that it is doing more than just checking the environment. 2010-01-22 12:30:17 -08:00
Tim Almdal
ae568b6182 Refactor the identity provider installation in to a common helper method (change_provider) with an initialization callback. 2010-01-22 12:09:11 -08:00
Tim Almdal
603c3049a1 Treat identity providers just like other modules and use the admin_module to
install and switch to a different identity provider.
2010-01-22 09:39:29 -08:00
Bharat Mediratta
5162e35d49 Use an empty password for the guest user. 2010-01-17 17:54:14 -08:00
Bharat Mediratta
cfb27dde02 Adjust installers to work with model based validation. 2010-01-17 13:28:24 -08:00
Bharat Mediratta
6a4dda9bde Convert Admin_Users_Controller, User_Model and Group_Model to use
model based validation.
2010-01-16 21:15:12 -08:00
Bharat Mediratta
a691dcc63c Convert Admin_Users::add_user() to use model based validation. Get
the rules and business logic out of the form and user::create(), and
move it into User_Model::save().
2010-01-16 19:58:55 -08:00
Bharat Mediratta
c10386fe87 Convert html::specialchars() to html::chars() 2009-12-18 01:05:02 -08:00
Bharat Mediratta
1fd0e14359 Convert all DB where() calls to take 3 arguments.
Convert all open_paren() calls to and_open() or or_open() as appropriate.
2009-11-26 12:09:04 -08:00
Bharat Mediratta
2e420522ec Preliminary work to cut over to Kohana 2.4
- Kohana::log() -> Kohana_Log::add()
- Kohana::config_XXX -> Kohana_Config::instance()->XXX
- Implement View::set_global in MY_View
- Updated Cache_Database_Driver to latest APIs
- ORM::$loaded -> ORM::loaded()
- Updated item::viewable() to use K2.4 parenthesization
2009-11-25 13:22:24 -08:00
Tim Almdal
1c428df9e0 Revert "Use an event 'check_user_name_exists' to validate the input name is already in use. The parameter is a standard class with the name and an exists flag. Any event handler should or their result with the exists flag."
This reverts commit 04bf50bfb4.
2009-10-31 16:16:47 -07:00
Tim Almdal
c3dcfd136b Move the identity provider menu item under the settings menu and make the User/Groups administration a first level menu item. As discussed via -devel mailing list. 2009-10-31 14:41:55 -07:00
Tim Almdal
abe42002b2 Don't specify the default identity provider in the gallery installer. Let the user module use that as a trigger to set ownership of the root album to the administrator. 2009-10-31 14:13:35 -07:00
Tim Almdal
04bf50bfb4 Use an event 'check_user_name_exists' to validate the input name is already in use. The parameter is a standard class with the name and an exists flag. Any event handler should or their result with the exists flag. 2009-10-29 17:09:01 -07:00
Tim Almdal
53dd35b5c8 Just show the Identity admin menu item all the time. This gives a place to hang other user related module administartion menu links. 2009-10-29 08:30:39 -07:00
Tim Almdal
f16941a90b Add a static modifier to the private method 2009-10-28 11:36:34 -07:00
Tim Almdal
3228f04ed9 Fire the logon_event when the user logs on. Cleanup some old code from the user/helpers/user.php file." 2009-10-27 14:01:53 -07:00
Tim Almdal
1347a30050 Add a password strength meter. 2009-10-27 12:23:48 -07:00
Tim Almdal
156a99beef Set the minimum password length to 5. The gallery owner can change this in the advance settings. 2009-10-27 10:13:52 -07:00
Tim Almdal
274d4680fa Upgrade the gallery module to version 16 to reflect the refactoring of the user module into an identity provider. Change how we determine if there are available groups that we need to export 2009-10-26 10:05:25 -07:00
Tim Almdal
24bd8e4c28 Remove a redundant comment, change the name of the identity change event to 'identity_before_change' and change the name of 'login::get_login_form()' to 'login::get_form()' 2009-10-24 11:32:09 -07:00
Tim Almdal
0a6b540092 Merge branch 'master' into talmdal_dev
Conflicts:
	modules/server_add/helpers/server_add_theme.php
2009-10-24 07:28:22 -07:00
Chad Kieffer
3814186592 Created user.css. Moved user-related form css to the new sheet. 2009-10-23 22:25:36 -06:00
Tim Almdal
c24d01bb9c Standardize the use of the lookup methods 2009-10-23 10:52:42 -07:00
Tim Almdal
d0186436de Merge branch 'master' into talmdal_dev
Conflicts:
	modules/gallery/tests/Albums_Controller_Test.php
	modules/user/helpers/user.php
2009-10-23 10:01:40 -07:00
Tim Almdal
2e998664d5 move controllers and views to the user module to make the Identity Provider refactor smaller 2009-10-23 09:23:02 -07:00
Tim Almdal
9297325c27 Minor changes to more closely align this branch with master 2009-10-23 06:52:08 -07:00
Tim Almdal
923a322ef5 Change the Admin_Identity_Controller to not destroy the session until after the new provider is installed. 2009-10-23 06:09:24 -07:00
Tim Almdal
b74b131e25 Change Identity adminstration to use the uninstall/install methods when changing providers. 2009-10-22 22:30:25 -07:00
Tim Almdal
6b51de49c5 Change the modifier on activate and deactivate methods to static as they are in a helper class. 2009-10-22 13:28:23 -07:00
Tim Almdal
3c936d661a Change the name of identity library from Identity to IdentityProvider. Create a helper class called identity to simplify call the Identity Provider. Move the contents of MY_Session.php to the new helper class and remove the MY_Session class 2009-10-22 13:11:03 -07:00
Tim Almdal
21383dddc3 Make sure we set the active identity provider when the user module is installed. This is mostly for the unit_tests as when the gallery3 installer is used, the user module is activated by default. 2009-10-21 11:52:55 -07:00
Tim Almdal
c5f89967f0 When activating the user module set all items to be owned by the administrator user. 2009-10-21 08:20:41 -07:00
Tim Almdal
b49b213072 Only show the user/group administration screen if the active idenity provider is the user module. 2009-10-20 20:29:28 -07:00
Tim Almdal
7f9441c33d Changes to Identity interface to allow for multiple Identity providers. What I've tested to this point, is you can install a new provider, switch to it, login as administrator, uninstall the default user module, reinstall the user module, switch back to the user module and login. 2009-10-20 16:32:22 -07:00
Tim Almdal
098b57bf18 Simplify the user interface by moving the password reset functionality into the user module
Bagging the User_Definition and Group_Definition abstract classes and replacing them with interfaces with the same names.
Make sure all the unit tests work.
2009-10-19 12:53:44 -07:00
Tim Almdal
c9a030dd08 Add a menu item to manage the Identity drivers if there is more than one installed 2009-10-18 09:21:34 -07:00