27 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
1a0d76c43e When moving a single item, just copy its permissions from its parent
album.  This is totally legal since an items permissions must be the
same as its parent's, and it's much faster for large installs where
a complete recalculation can be very costly.  Should fix #1360.
2010-09-13 22:23:09 -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
d4423eb349 Reset the active user to admin in all test cases where we change the
user to something else.
2010-02-23 13:50:57 -08:00
Bharat Mediratta
63db756441 Switch to using test helper. Also, reload the album before running
access::deny since the mptt pointers will have changed.
2010-01-27 01:49:37 -08:00
Bharat Mediratta
c5cdd13b41 Added view_permissions_propagate_down_to_photos_test(). 2010-01-26 13:29:22 -08:00
Bharat Mediratta
76da85a1a0 Extend Gallery_Unit_Test_Case instead of Unit_Test_Case. 2010-01-19 22:38:19 -08:00
Bharat Mediratta
ebb909625c Merge branch 'master' into bharat_dev 2010-01-18 12:54:26 -08:00
Bharat Mediratta
4eafe97b48 Reload $item after removing view permissions. 2010-01-18 11:57:23 -08:00
Bharat Mediratta
6e73b08595 Mostly conver to model based validation. Not all tests pass yet. 2010-01-17 20:37:57 -08:00
Bharat Mediratta
ca293db214 Don't rely on implicit object -> id conversion, that doesn't work with K24's Database_Builder::where() 2009-12-22 13:57:49 -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
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
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
b994ea9d62 use the appropriate API's 2009-10-21 11:53:41 -07:00
Tim Almdal
78ee4193b7 Remove all non Identity API methods from Identity.php. Created an MY_Session class to provide the user state changes in the session and a login.php helper that has the login form. 2009-10-16 10:06:58 -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
79b4b8bdc6 update the Access_Helper_Test to use the user::lookup_by_name API method. 2009-10-09 01:27:27 -07:00
Tim Almdal
5fd82a2ede Back out the fix for ticket #452
Revert "Changed access::user_can to force the owner of an item to have"

This reverts commit 0b97cfd6f0.
2009-07-27 11:13:20 -07:00
Tim Almdal
0b97cfd6f0 Changed access::user_can to force the owner of an item to have
view permission on the parent. Added a whitelist of allowable
owner permissions.

If the requested permission is view and the user requesting access
is the owner, check that they have view permission to the parent.
2009-07-26 09:29:29 -07:00
Tim Almdal
d4104a23ec Add explicit unit tests for access::user_can 2009-07-22 15:16:56 -07:00
Bharat Mediratta
8a6556b30b Fix a bug where moved items don't properly inherit permissions from
their new target.  After each move, recalculate the permissions for
the new parent's hierarchy.

Fixes ticket #552
2009-07-17 08:14:08 -07:00
Bharat Mediratta
ffb3abdcac Restore "view" permissions on the root album in teardown. 2009-06-02 13:37:19 -07:00
Bharat Mediratta
28b41056e3 Restructure things so that the application is now just another module.
Kohana makes this type of transition fairly straightforward in that
all controllers/helpers/etc are still located in the cascading
filesystem without any extra effort, except that I've temporarily
added a hack to force modules/gallery into the module path.

Rename what's left of "core" to be "application" so that it conforms
more closely to the Kohana standard (basically, just
application/config/config.php which is the minimal thing that you need
in the application directory)

There's still considerable work left to be done here.
2009-05-27 15:07:27 -07:00