Commit Graph

25 Commits

Author SHA1 Message Date
Tim Almdal
961d5e11cf Fix unit tests where the albums, resizes and thumbs directory were
being deleted.
Fix for ticket #182
2009-03-25 15:22:23 +00:00
Bharat Mediratta
a83db20fe2 Fix minor correctness issues 2009-03-17 18:09:21 +00:00
Tim Almdal
ee2407cde2 Fix the test failures. If albums are created manually instead of
calling album::create, then the default sourt column needs to be set
to id.
2009-03-11 00:41:51 +00:00
Andy Staudacher
9406e80c90 Fix Access_Helper tests for MySQL strict mode (can't omit Iten type in inserts, it doesn't have a default value). 2009-01-11 03:28:57 +00:00
Bharat Mediratta
bfb040a463 Fix a bug where we were accidentally allowing view permissions when
allowing or resetting permission further down in the tree.  This bug
was introduced when I refactored the view permission cache into the
items table.  Updated test to catch it.
2008-12-31 00:47:15 +00:00
Bharat Mediratta
ad719b9b6f Fully implement the view_full permission. 2008-12-31 00:18:24 +00:00
Bharat Mediratta
5713e3c66e Change photo::create() and album::create() to take ORM instances
instead of ids.
2008-12-23 04:36:09 +00:00
Bharat Mediratta
dc08917345 Fix a bug where we were not deleting the .htaccess file on access::reset() 2008-12-16 02:31:13 +00:00
Bharat Mediratta
61618af0db Create and delete .htaccess files based on the view permissions for
the group::everybody() user.
2008-12-16 01:04:19 +00:00
Bharat Mediratta
3d2fc86604 Permission only function on albums. 2008-12-16 00:30:05 +00:00
Bharat Mediratta
b6363bcb03 Update to reflect changes in Kohana ORM relationship code.
Now you must call ORM::save() after ORM::add() and ORM::remove().
2008-12-15 20:49:05 +00:00
Bharat Mediratta
af8c74f612 Fix a bug where parent permissions were not getting inherited to newly
created albums and photos.
2008-12-13 20:06:20 +00:00
Bharat Mediratta
8ba5ea3cf8 Make sure that access::can fails if the item is not loaded 2008-12-13 19:49:33 +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
18a6614a11 Change all access API methods to take ORMs instead of ids. This will
minimize reloading objects from the database.
2008-12-10 07:05:49 +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
f69f3967ea move user::delete() to User_Model::delete() 2008-12-09 00:07:26 +00:00
Bharat Mediratta
e3ad42a276 Add access::can() which verifies that the user belongs to a group that has the
given permission.
2008-12-09 00:02:20 +00:00
Bharat Mediratta
bd3a472be7 Rename access::can() to access::group_can() 2008-12-08 10:46:53 +00:00
Bharat Mediratta
5d23a6515d Finish writing unit tests for Access. No bugs found! 2008-12-07 10:56:44 +00:00
Bharat Mediratta
bf7ab8904a Change ORM_MPTT::add_to_parent() to take an ORM instead of an id so
that it's consistent with ORM_MPTT::move_to()
2008-12-07 08:46:44 +00:00
Bharat Mediratta
bae905a4cb Improvements to access helper.
o Rename access::remove_group() to access::delete_group() for
  consistency.

o Wrote more unit tests

o Tests found a bug in access::remove_item() .. yay!
2008-12-04 06:40:35 +00:00
Bharat Mediratta
d8511f2fde Implement two tests 2008-12-03 19:10:23 +00:00
Bharat Mediratta
efc6270295 Test stubs 2008-12-03 17:17:59 +00:00