45 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
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
c3c2b45280 Update the copyright to 2010. It's only 3 months into the year :-) 2010-03-03 10:15:34 -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
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
f16941a90b Add a static modifier to the private method 2009-10-28 11:36:34 -07:00
Tim Almdal
c24d01bb9c Standardize the use of the lookup methods 2009-10-23 10:52:42 -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
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
bc241e44c2 Cleanup merge of user/group helpers into Identity interface. Reduce redundant code in the user module and remove references to the Identity helper from the user module as the user module should be able to access things directly. Simplify the get_user_list api method to just accept an array of ids to return user objects for. 2009-10-16 08:55:26 -07:00
Tim Almdal
00eacd659f Start simplifying the interface by moving the static methods from user.php and group.php. Tried creating a identity helper, but the helper identity.php was confused with the library Identity.php. So got around this by making the methods on Identity static and calling the instance within the static methods. Also temporarily moved the user.php and group.php back into the user module. 2009-10-16 08:53:31 -07:00
Tim Almdal
08c01fec6c The initial commit of refactoring the user/group adminsitration into a driver.
Create an Identity library that defines the interface the Gallery3 expects
Move the user and group helpers into the gallery module to provide the familiar
interface into the Identity library.
Create a Gallery Identity back-end that is supplied by the user module.

The vision here is that all user and group code that is gallery or ui specific
is contained within the core product.  Anything that relates to manipulating a
user or group is contained in the back end code that can be replaced.
2009-10-05 16:27:52 -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
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
Bharat Mediratta
5495037a3d Gee it's May already. Update copyright to 2009. 2009-05-13 20:04:58 +00:00
Bharat Mediratta
71defb7d40 Add group::lookup_by_name() 2009-05-12 22:34:36 +00:00
Bharat Mediratta
6bfadc14ed Fully implement the user administration backend with drag/drop to add
users to groups.
2009-01-28 22:42:50 +00:00
Tim Almdal
a8233ed979 Undo the adding underscores to the id on forge generated forms 2009-01-25 06:28:04 +00:00
Tim Almdal
cbff78daa8 Supply a form id on all forms. This id can be used by modules other
than the originating module to provide additional functionality to the form.
2009-01-24 17:26:47 +00:00
Andy Staudacher
e4a9b19bf9 Changing t() placeholder syntax from {{replace_me}} to %replace_me. 2009-01-15 10:02:41 +00:00
Bharat Mediratta
f3ba69c1d6 Make sure that helper functions are all static. Add new
File_Structure_Test to make sure we don't regress.

According to the PHP docs, the "public" keyword is implied on static
functions, so remove it.  Also, require private static functions to
start with an _.

http://php.net/manual/en/language.oop5.visibility.php
2009-01-14 04:12:02 +00:00
Bharat Mediratta
ae73ef3d57 Updated for new Form_Submit API.
OLD:
  $form->submit("Foo")  -->  <input type="submit" value="Foo">

New:
  $form->submit("foo_button")->("Foo") --> <input type="submit" name="foo_button" value="Foo">

Mostly we don't care what the button is so we leave the name blank.
2009-01-12 07:50:04 +00:00
Andy Staudacher
a631fe29f3 i18n refactoring: Rename all _() (reserved by gettext) calls to t().
- And refactor printf to our string interpolation / pluralization syntax
- Also, a slight change to the translations_incomings table, using binary(16) instead of char(32) as message key.
2009-01-08 17:13:06 +00:00
Bharat Mediratta
4ee24a6645 Put up an error if you rename a user to an already existing name. 2009-01-06 10:05:08 +00:00
Bharat Mediratta
fa1ccbd86d Fix up all the various little forms to have submit buttons, fieldset legends, etc etc. 2009-01-06 09:22:29 +00:00
Felix Rabinovich
1d76689e4b Add title back to non-DHTML form to maintain consistency 2008-12-28 22:49:58 +00:00
Felix Rabinovich
a26127ae9c Added title to user/group administration dialogs 2008-12-26 20:34:56 +00:00
Felix Rabinovich
6dcc3e5c25 User/Group administration cleanup 2008-12-26 06:14:24 +00:00
Felix Rabinovich
c154f9f20a Group Administration 2008-12-26 04:35:27 +00:00
Bharat Mediratta
fdc0f83024 Big round of normalization of the way that our controllers
communicate.  Almost all controllers now use JSON to speak to the
theme when we're dealing with form processing.  This means tht we only
send the form back and forth, but we use a JSON protocol to tell the
browser success/error status as well as the location of any newly
created resources, or where the browser should redirect the user.

Lots of small changes:
1) Admin -> Edit Profile is gone.  Instead I fixed the "Modify Profile" link
   in the top right corner to be a modal dialog

2) We use json_encode everywhere.  No more Atom/XML for now.  We can bring those
   back later, though.  For now there's a lot of code duplication but that'll be
   easy to clean up.

3) REST_Controller is no longer abstract.   All methods its subclasses should create
   throw exceptions, which means that subclasses don't have to implement stubs for
   those methods.

4) New pattern: helper method get_add_form calls take an Item_Model,
   not an id since we have to load the Item_Model in the controller
   anyway to check permissions.

5) User/Groups REST resources are separate from User/Group in the site
   admin.  They do different things, we should avoid confusing overlap.
2008-12-25 05:12:46 +00:00
Felix Rabinovich
6e68c5ca28 added sprintf to strings for tranlation support 2008-12-25 02:59:45 +00:00
Felix Rabinovich
481352c382 User administration: 1. Add users; 2. Group administration; 3. General cleanup 2008-12-25 02:16:41 +00:00
Bharat Mediratta
a3142246e4 Move the view permission cache directly into the item table for efficiency. Unit tests ftw! 2008-12-12 06:54:48 +00:00
Bharat Mediratta
2cf3233f54 Get rid of all pseudo users and pseudo groups, while preserving all
other functionality.  This makes our user/group and access code
fully consistent.
2008-12-12 00:59:30 +00:00
Bharat Mediratta
e62103b8d9 Move code to delete users and add/remove users from groups into the
model.
2008-12-09 08:47:30 +00:00
Bharat Mediratta
91c4bda1ec Prototype access control model. There's much left to do, but it's a
working implementation.
2008-12-01 08:50:00 +00:00
Bharat Mediratta
e1f39ac13f Re-enable code to drop view columns from the items table when deleting groups. 2008-11-26 09:38:39 +00:00
Tim Almdal
de56a33c9c Clean tag creation 2008-11-26 06:37:12 +00:00
Bharat Mediratta
226df2a8f8 Add support in the scaffolding for adding users to groups, adding and
removing users and groups.
2008-11-26 04:45:43 +00:00
Bharat Mediratta
5ccb050413 group::create() and group::delete() now manage the view_## columns in
the items table.

Convert installer over to using new creation API.
2008-11-26 04:13:57 +00:00
Bharat Mediratta
5fce343ca4 Create user/group create/delete functions and have the scaffolding use them. 2008-11-26 03:34:39 +00:00