102 Commits

Author SHA1 Message Date
Bharat Mediratta
d45a737779 Update copyright to 2013. Fixes #1953. 2013-01-21 01:22:01 -05:00
Bharat Mediratta
bf2bb3e1ea Update copyright to 2012. #1822 2012-02-27 09:48:23 -08:00
Bharat Mediratta
423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08:00
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
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
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
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
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
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
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
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
14e14003de refactor the user and group helpers into the gallery core module. 2 reason, first it makes sense that users and groups are a gallery requirement and belong in core. secondly, prepares the way for the Identity refactor. 2009-10-13 13:37:37 -07:00
Tim Almdal
f8eee90705 remove the unused private function user::_md5Salt() 2009-10-13 12:38:21 -07:00
Tim Almdal
2c711d8908 refactor locale related functionality out of the user module and into the gallery module. 2009-10-13 12:33:00 -07:00
Tim Almdal
1ee7d24766 Add support for the in filter to get_user_list and get_group_list. Convert the notifications to use user::get_user_list instead of accessing the table directly. 2009-10-09 01:27:26 -07:00
Tim Almdal
00ee91837f Convert direct lookups for the user table using ORM to using the user::lookup_by_name and user_lookup API methods.
Convert the Admin_User controller
Convert the login and password change controller
Change the item model to call user::lookup to get the owner.
On the log model, delete the relationship between the log and user table, and replace with a
call to user::lookup
(cherry picked from commit 194cc3b27a)
Create the get_user_list, lookup_by_name, lookup_by_hash and get_group_list api functions
2009-10-09 01:26:35 -07:00
Tim Almdal
f67bfd0992 Change the users.php controller so its no longer restful. The problem with our approach to restfulness is that it assumes that the resource will be found in the gallery database. It may well be there, but in the case of using plugable drivers for users management, there are no guarantees that it is in our database or it could be in a ldap directory. So it was just easier to remove the restfulness and just call user::lookup instead.
(cherry picked from commit b3211cb2a8)
2009-10-08 23:22:07 -07:00
Chad Kieffer
3e6ba7acc3 Renamed most, if not all css selectors from gName to g-name. Moved a few shared images from wind to lib. Deleted unused images in the admin_wind. This will likely break a few ajax features. 2009-10-04 00:27:22 -06:00
Chad Kieffer
e1e8904e4a Convert gDialog and gCancel over to g-dialog and g-cancel. Refactor CSS id's and classes in the login/reset password dialog. 2009-09-30 22:49:36 -06:00
Andy Staudacher
001623c755 Add new locale preferences: Adding per session (cookie) locale preferences and check the browser's / OS' locale preferences.
Ticket 582.
2009-09-04 11:06:20 -07:00
Bharat Mediratta
50c624ed1b Fix active() to not use user::guest() as the fallback for our Session::get() call. 2009-08-29 12:20:03 -07:00
Bharat Mediratta
67d4ae21d5 Clean up user form events. Thanks to Ben Smith (glooper). 2009-07-29 17:43:12 -07:00
Tim Almdal
7a6952720c Pass the variable when the "user_edit_form" event is fired. 2009-07-25 14:48:10 -07:00
Bharat Mediratta
1fbdf1a1e0 Add form processing events:
user_add_form_admin            admin adding a user
 user_edit_form_admin           admin editing a user
 user_add_form_admin_completed  successfully added a user (admin)
 user_edit_form                 user editing their own settings
 user_edit_form_completed       successfully edited a user (admin and user editing own settings)
2009-07-23 10:35:52 -07:00
Bharat Mediratta
df22832a5b Rename "locale" helper to "locales" to avoid conflicting with PHP 5.3.
Fixes ticket #194
2009-07-17 18:35:06 -07:00
Bharat Mediratta
0f766b149d Second non-trivial change to the event code. We now publish model
related events from within the model handling code.  The only
exception to this currently is item_created which is challenging
because we have to save the item using ORM_MPTT::add_to_parent()
before the object itself is fully set up.  When we get that down to
one call to save() we can publish that event from within the model
also.
2009-07-16 12:31:40 -07:00
Andy Staudacher
93e9efed97 Use Unicode characters (looks better to translator, and fixes normalization issue in translation server) 2009-07-02 20:49:47 -07:00
Bharat Mediratta
8ebd941c81 Properly call user::login when we automatically login the admin user
immediately after install.  Fixes ticket #323.
2009-05-31 21:48:43 -07:00
Chad Kieffer
916405bc4b White space fixes 2009-05-26 01:53:18 +00:00
Chad Kieffer
30592cabd2 Changed name to username in user admin form labels 2009-05-25 20:46:19 +00:00
Bharat Mediratta
3756c849c4 Use phpass as our hashing mechanism, and check for it first (instead
of checking G1/G2 techniquew first).
2009-05-24 06:11:20 +00:00
Chad Kieffer
cc329526c0 Changed Name label to Username, closes ticket #93 2009-05-21 04:48:53 +00:00
Bharat Mediratta
993742feb3 Move 3rd party PasswordHash library into the "lib" dir for
consistency.  No 3rd party libs in "libraries", at least for now.
2009-05-18 03:39:42 +00:00
Bharat Mediratta
5495037a3d Gee it's May already. Update copyright to 2009. 2009-05-13 20:04:58 +00:00
Bharat Mediratta
9c24b5d94d Variety of changes to the way we do user editing:
1) Allow admins to edit the admin bit of other admins
2) Don't allow admins to delete themselves (partial fix for ticket #213)
3) Inline user::update().  Don't do form processing in helper methods!
4) Inline user::_get_edit_form() so that we can treat edit forms differently.
   Trying to hard to make common functions makes for weird edge cases.
2009-05-13 03:56:50 +00:00
Bharat Mediratta
71defb7d40 Add group::lookup_by_name() 2009-05-12 22:34:36 +00:00
Bharat Mediratta
823077f342 Fix a comment. 2009-05-12 22:31:54 +00:00
Bharat Mediratta
6b89e7fa2a Add user::lookup_by_name() 2009-04-18 23:06:38 +00:00
Tim Almdal
9ed0dd51bf Fix for ticket #201.
1) create common update function so processing consistent between the
user edit and admin edit.
2) created common private helper function to build the user edit form
the same way.
So a user can now change their user name if the new one doesn't exist.
2009-04-03 17:33:07 +00:00
Tim Almdal
3cb2c42e49 Fix for ticket #181. Valiant take note of the change to
admin_users.php.  I had to remove the check for the locale as it
hasn't been added to the form.
2009-03-25 16:21:36 +00:00
Bharat Mediratta
8458eba279 Switch the locale::$locales data structure to be an array instead of a
stdClass because we're not allowed to asort() stdClass objects in PHP
5.2.6.
2009-03-16 09:08:12 +00:00
Bharat Mediratta
54e07d0769 Get rid of the extra robust code we had in here to make the
scaffolding work when the Gallery wasn't installed yet.  Now we force
users through the installer.
2009-03-16 08:05:07 +00:00
Bharat Mediratta
736d74d05f Clean up the login, maintenance login and required-top-level-login code.
We now have two clear and separate login approaches:
  login/ajax
  login/html

Choose the one that's appropriate.  Totally simplified the maintenance
page to be separate from the theme and dead simple, and use login/html
approach there.  Totally simplified the top level login
(login_page.html.php) to just be a login page, not the rest of the
chrome on the page and use the login/ajax approach there.

Don't use access::required in albums and then catch the exception,
instead use access::can and check the return code.

Improve the text for maintenance mode.
2009-03-16 04:33:45 +00:00
Bharat Mediratta
72c7fed975 Log the user in as admin after running the web installer, and give
them a nice "Welcome to Gallery 3" dialog.  The text in there needs a
little work but it's a start.

In the process, re-build the install.sql using the scaffolding code.
2009-03-08 21:21:09 +00:00
Andy Staudacher
237656f6c8 Differentiate between available and installed languages. Provide admin UI to install languages.
See: https://apps.sourceforge.net/trac/gallery/ticket/75 (first step for this task)
2009-02-19 08:48:14 +00:00