Commit Graph
507 Commits
Author SHA1 Message Date
Bharat Mediratta 87ce71eb90 Sort users in group box by name. Thanks edisonnews! Fixes #1662. 2011-03-27 11:50:47 -07:00
Bharat Mediratta 423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08:00
Bharat Mediratta 8583c1d259 Style fixes. 2011-01-15 15:10:27 -08:00
Bharat Mediratta ee13b934f4 Fix all the head() and admin_head() theme callbacks to return the
results of the $theme->css() and $theme->script() calls.  This handles
the case where combining scripts/css returns HTML instead of putting
it in the queue for combination.  Fixes #1611.
2011-01-15 13:14:43 -08:00
Bharat Mediratta d511fc77ad Tweake Joe's change to admin_users to revert the code that joins against the items
table; it's not clear that this is going to be efficient for large data sets.
2011-01-15 12:33:51 -08:00
Joe7 df802de6ae Making good use of Pagination class to reduce code (removed MY_Controller which duplicated some functionality available in Pagination as well) 2011-01-11 21:28:25 +01:00
Joe7 00b520fffd coding style 2011-01-11 20:53:48 +01:00
Joe7 97fc535411 Minor css mod to make it obvious paging belongs to user block 2011-01-09 21:19:55 +01:00
Joe7 89737c09d5 Paginator for user manager admin view
Closes ticket #1557
Note: also optimizes the way item count is retrieved for users, saving <user_count>-1 queries when displaying this page
2011-01-09 21:05:28 +01:00
Bharat Mediratta 8a5bbc896b Follow on to 1057436b7c -- cache the
users and groups as an array so that multiple calls will not call
ORM_Iterator->current() repeatedly.
2010-12-15 19:57:09 -08:00
Bharat Mediratta 1057436b7c Cache the result of User_Model::groups() and Group_Model::users() and
invalidate it on save/delete for efficiency.  Fixes #1529.
2010-12-15 16:28:18 -08:00
Bharat Mediratta cd48b89f31 Consolidate all the random code into a random helper that offers:
random::hash()
  random::string()
  random::percent()
  random::int()

So that we don't have lots of different ways to get random values all
over the code.  Follow-on to #1527.
2010-12-15 14:57:00 -08:00
Bharat Mediratta dff1a53696 All modules should be named Xxx_Core for extensibility. Fixes #1458. 2010-10-25 21:05:31 -07:00
Bharat Mediratta 7116f820ca Remove the 4 character minimum for group name length. Fixes ticket #1396. 2010-09-22 21:43:44 -07:00
Bharat Mediratta af24aa5abe The full_name field is required to be NOT NULL. Not really sure why
this is a hard requirement, but for now in User_Model::save() let's
use the empty string if the field itself is null.  Fixes ticket #1371.
2010-09-14 11:47:53 -07: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 d698a19e0e Transfer deleted files to the active user. Or at least say that's what we're going to do, we actually transfer them to one of the admins 2010-09-10 08:40:30 -07:00
Bharat Mediratta 90ba0f9237 Show the number of photos/albums the user owns in the Admin > Users
page, and improve the message to explain what's going to happen to the
deleted user's items.  Partial fix for #1344, which I can't reproduce
now.
2010-09-08 00:50:30 -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 ff1d8aea2f We use UTF-8 everywhere. Fixes ticket #1285. 2010-08-15 01:59:54 -07:00
Bharat Mediratta c3ad4b5374 Whitespace fix 2010-08-08 17:14:09 -07:00
Bharat Mediratta e5a1da71ed Convert tabs to spaces to fix File_Structure_Test. 2010-08-08 15:05:55 -07:00
Bharat Mediratta 3492f1712d Fix the i18n error message for missing/incorrect password. Fixes ticket #1265. 2010-08-01 22:18:22 -07:00
Tim Almdal a453170727 Merge branch 'dialog' of github.com:gallery/gallery3 into dialog 2010-08-01 08:31:09 -07:00
Tim Almdal fc580037e7 Merge branch 'master' into dialog 2010-08-01 08:26:39 -07:00
Bharat Mediratta a5f701951e Add a localized error message for missing usernames. Fixes ticket #1266. 2010-08-01 01:33:59 -07:00
Bharat Mediratta 7607e1f932 Full pass over all the JSON encoding and JS dialog code. We now abide
by the following rules:

1) An initial dialog or panel load can take either HTML or JSON, but
   the mime type must accurately reflect its payload.

2) dialog form submits can handle a pure HTML response, but the mime
   type must also be correct.  This properly resolves the problem
   where the reauth code gets a JSON response first from the reauth
   code, and then an HTML response when you reauth and continue on to
   a given form -- try it out with Admin > Settings > Advanced.

3) All JSON replies must set the mime type correctly.  The json::reply
   convenience function does this for us.

4) By default, any HTML content sent back in the JSON response should be
   in the "html" field, no longer the "form" field.

The combination of these allows us to stop doing boilerplate code like
this in our controllers:

  // Print our view, JSON encoded
  json::reply(array("form" => (string) $view));

instead, controllers can just return HTML, eg:

  // Print our view
  print $view;

That's much more intuitive for developers.
2010-07-31 21:16:17 -07:00
Tim AlmdalandBharat Mediratta 91a2c04a24 More patches as part of #1225. Change the 'core' modules to use the json::reply
method to set the content type header and encode the response as a json object
2010-07-31 15:44:55 -07:00
Tim AlmdalandBharat Mediratta 89d18c0714 Partial fix for #1225 addresses the issues with the user edit forms. 2010-07-31 15:44:55 -07:00
Tim Almdal 48c2e73048 More patches as part of #1225. Change the 'core' modules to use the json::reply
method to set the content type header and encode the response as a json object
2010-07-23 23:05:39 -07:00
Tim Almdal 2cb87631b7 Partial fix for #1225 addresses the issues with the user edit forms. 2010-07-23 23:05:39 -07:00
Bharat Mediratta af8bb05d5d Show the old group name in the error message when we fail to modify a group. Fixes ticket #1233. 2010-07-20 15:33:48 -07:00
Bharat Mediratta e5b1a4fc23 Fix a bunch of missing or invalid error messages. Fixes ticket #1232. 2010-07-20 15:21:44 -07:00
Bharat Mediratta 112582daeb Add internationalized error messages for adding and editing groups. 2010-07-20 12:18:03 -07:00
Tim Almdal dbf3199e46 Fix for ticket #1181. Use $.getJSON to retrieve the json contents of the dialog. Convert all the controllers
that create the data to go into a dialog to return the html as part of a json object.
2010-07-06 14:12:01 -07:00
ckiefferandTim Almdal 9911372d58 Removed self-closing slash from opening <li> tag. 2010-06-15 09:14:09 -07:00
ckieffer f1076590f1 Add page_title to admin views. Closes #1038. 2010-04-30 00:08:37 -06: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
Andy Staudacher 74113f869a Fix for ticket #1037: Only show language drop-down when there's actually a choice. 2010-02-27 20:21:22 -08:00
Andy Staudacher a18ddd2fe9 Add more randomness to reset password mechanism. 2010-02-27 15:39:36 -08:00
Chad Kieffer f4fc245603 Add link to edit user group names. Closes ticket #1028. 2010-02-20 10:48:27 -07: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
Andy Staudacher cd45c94fe6 Get rid of unnecessary view file. 2010-02-11 15:59:17 -08:00
Andy Staudacher dc94f6e45a Include user name in logging message for failed password reset. As Bharat points out, t() ensures that parameters are escaped for XSS. 2010-02-11 14:35:05 -08:00
Andy Staudacher cd98f85260 Fix for ticket 1010: Don't leak valid user names in "forgot password" form.
Includes fixes for user forms as well (edit user / email / password).
2010-02-11 13:11:31 -08:00