Commit Graph

8 Commits

Author SHA1 Message Date
Bharat Mediratta
a432a43b3b Revert "Change the item rest update processing to call the
item::move(source, target) helper when the parent member has changed.
Using the move method insures that names and slugs that could conflict
in the target album are resolved properly.  Changed the item::move
method so it returns a message to be displayed if the caller chooses.
And changed the move controller to display the message returned by the
move if the item name was renamed as part of the move."

Rolling this back for a couple of reasons:

1) Bug in move.php ("message.info" is not a function name)

2) Having the message come back from the API call as a side-effect is
sloppy.  We should find a cleaner way to do this checking.

3) having item::move() call save() on any changed values in the ORM
is counter-intuitive.  Move should move, save should save.

I think the right approach here is to roll the move() code properly into
save().

This reverts commit 2492280cc0.
2010-06-15 17:18:22 -07:00
Tim Almdal
2492280cc0 Change the item rest update processing to call the item::move(source, target) helper when the parent member has changed. Using the move method insures that names and slugs that could conflict in the target album are resolved properly. Changed the item::move method so it returns a message to be displayed if the caller chooses. And changed the move controller to display the message returned by the move if the item name was renamed as part of the move. 2010-06-15 12:52:28 -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
8b9a02084a Updates for the latest version of Kohana 2.4:
1) Controller::$input is gone -- use Input::instance() now
2) Handle new 'database.<default>.connection.params' parameter
3) Handle new 'cache.<default>.prefix' parameter
2009-12-21 21:27:43 -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
2aad580f53 Move specialized (pretty) url generation back into Item_Model so that
we're not relying on overriding url::site() to do tricks around item
urls.  This means that you won't get item urls by doing
url::site("albums/37"), for example, but it also means that we won't
get pretty urls where we don't expect them (like in the action of a
<form> element).

Incidentally, this will help us move over to using the slug format
because if you've got a bad character in a url, the edit forms will
now work on it since they'll be id based.
2009-09-08 13:44:52 -07:00
Bharat Mediratta
43abcd9386 Security pass over all controller code. Mostly adding CSRF checking
and verifying user permissions, but there are several above-the-bar
changes:

1) Server add is now only available to admins.  This is a hard
   requirement because we have to limit server access (eg:
   server_add::children) to a user subset and the current permission
   model doesn't include that.  Easiest fix is to restrict to admins.
   Got rid of the server_add permission.

2) We now know check permissions at every level, which means in
   controllers AND in helpers.  This "belt and suspenders" approach will
   give us defense in depth in case we overlook it in one area.

3) We now do CSRF checking in every controller method that changes the
   code, in addition to the Forge auto-check.  Again, defense in depth
   and it makes scanning the code for security much simpler.

4) Moved Simple_Uploader_Controller::convert_filename_to_title to
   item:convert_filename_to_title

5) Fixed a bug in sending notification emails.

6) Fixed the Organize code to verify that you only have access to your
   own tasks.  In general, added permission checks to organize which had
   pretty much no validation code.

I did my best to verify every feature that I touched.
2009-06-01 22:40:22 -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