Commit Graph

425 Commits

Author SHA1 Message Date
Bharat Mediratta
f20fa2cfed Change IdentityProvider::create_user() to take $email as well, since that's a required
parameter for the Gallery driver.
2010-01-17 20:37:25 -08:00
Bharat Mediratta
ab7be17b7f Switch to model based validation approach. 2010-01-17 20:17:50 -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
9488684220 Move model rules down into their validate() function for consistency.
Change "in_use" error to "conflict" for consistency.
2010-01-17 12:30:24 -08:00
Bharat Mediratta
5c49c041e7 Use "(string) $form" instead of "$form->__toString()" 2010-01-16 22:42:02 -08:00
Bharat Mediratta
4a2d5bc9e2 Convert Users_Controller to model based validation. 2010-01-16 21:24:18 -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
7f20f66079 Whitespace. 2010-01-16 18:00:02 -08:00
Bharat Mediratta
ff728b3ccd Whitespace. 2010-01-16 17:51:57 -08:00
Bharat Mediratta
dcf4b5e71a Don't pass MY_ORM::original() to update event handlers, since after
parent::save() it'll be reset.  Clone it first.

This is an alternate fix for #978.
2010-01-16 00:13:28 -08:00
Bharat Mediratta
058a84ed76 Convert ORM::in() to ORM::where(.., "IN", ..) for K24 compatibility. 2010-01-06 17:04:44 -08:00
Bharat Mediratta
bff7b393ec Stop checking the exact nature of all grups after install. It doesn't add any value. 2010-01-02 14:02:41 -08:00
Bharat Mediratta
057e8d09af Convert a bunch of leftover kohana::show_404 calls to throw
Kohana_404_Exception instead.  These are the ones where we used a
lower-case 'k' so my previous filter didn't catch it.
2009-12-23 20:51:33 -08:00
Bharat Mediratta
eb047d7f5d ORM relations now require you to do find_all() or count_all() to get the results. 2009-12-23 13:31:52 -08:00
Bharat Mediratta
c10386fe87 Convert html::specialchars() to html::chars() 2009-12-18 01:05:02 -08:00
Bharat Mediratta
0736cf203b In Kohana 2.4, ORM no longer does the find_all() call for us when we
retrieve related ORMs.  If we tack a find_all() on the end, it breaks
the User_Definition interface so create User_Model::groups() and
Groups_Model::users() as glue.
2009-12-17 21:32:53 -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
2ee38b3d8e ORM::$rules now has a special meaning. Use $form_rules for our
internal rules code.
2009-11-26 11:36:09 -08:00
Bharat Mediratta
0121bfd585 ORM::orderby -> ORM::order_by 2009-11-25 19:26:52 -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
Bharat Mediratta
38233c67a2 Merge branch 'master' of git@github.com:gallery/gallery3 2009-11-21 11:36:27 -08:00
Bharat Mediratta
d6695e83e2 Make email a required field. We're using the Kohana default error
messages when this fails, not the Gallery translation system so this
is not a great solution.  However, it's the same as the other
model-based rules we have currently so it's no worse.

Fixes ticket #897.
2009-11-21 11:17:38 -08:00
Tim Almdal
6bdb8c3d55 Correct inconsistent captialization. Fixes #906 2009-11-21 09:36:19 -08:00
Bharat Mediratta
1067e68292 Redesign the way that we consider page types to create buckets of page
types, and a subtype for specifics.  Currently the top level bucket

   collection, item, other

Here are the core subtypes so far:

   collection: album, search, tag
   item: movie, photo
   other: login, reset, comment-fragment, comment

It's legal to create new page_subtypes whenever you want.  Use the
appropriate page_type to get the coarse grain behavior that you want.
2009-11-17 14:04:45 -08:00
Chad Kieffer
a6f1d3ad44 Remove g-dialog-link from special groups delete button (registered users, everybody), it's supposed to be disabled. Updated wording of headings and instructions. 2009-11-14 23:31:14 -07:00
Chad Kieffer
68886627cf A few more g- prefix updates for the user module, this should be it. 2009-11-14 15:48:24 -07:00
Chad Kieffer
18a1681569 Added comments to user.css 2009-11-14 14:09:17 -07:00
Chad Kieffer
766d49c461 Fix floated group rows when more than one row exists. Attach g- before all css ids and classes for consistency. Other minor layout adjustments. 2009-11-14 14:03:11 -07:00
Chad Kieffer
d29d339ea0 Move the password strength image out of css and into an images folder. 2009-11-14 13:23:23 -07:00
Chad Kieffer
2bd4fa4b43 Remove g-actions, it doesn't serve any real purpose in styling or JavaScript. 2009-11-08 21:46:09 -07:00
Chad Kieffer
dbe6476255 Remove width class from add group form, it sizes the form's elements, not the form itself. 2009-11-06 20:26:09 -07: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
ddf8734a41 Caught a few more incorrect capitalizations. 2009-10-30 08:33:31 -07:00
Tim Almdal
c6fbd34f28 Add the add_user_to_group and remove_user_from_group api method calls. If the identity provider isn't writable, the method implementations should throw an Invalid Operation exception. 2009-10-29 19:16:08 -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
0bb2b7659f Add the admin_user api function to the identity helper and the IdentityProvider interface. 2009-10-29 11:12:55 -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
1d3651b329 Make the user name a required field. Fixes ticket #852 2009-10-28 17:13:23 -07:00
Tim Almdal
7ea13b3869 Normalize capitalization ticket #596 2009-10-28 12:15:52 -07:00
Tim Almdal
f16941a90b Add a static modifier to the private method 2009-10-28 11:36:34 -07:00
Tim Almdal
3b4a64c698 Check the minimum length when adding or modifying users via the admin screen. 2009-10-27 14:21:59 -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
514915438b Add a flag in the module.info (no_module_admin) to indicate that this module shouldn't be managed by the default module administration screen. This module will always be locked on that screen. 2009-10-27 07:57:51 -07:00
Tim Almdal
2dcd8f8a25 When we are changing the password using the change password from as part of the password reset, the input value is in the post[hash] variable as opposed to the get(key) value. This should fix ticket #850. 2009-10-27 07:35:28 -07:00