Commit Graph

16 Commits

Author SHA1 Message Date
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
5495037a3d Gee it's May already. Update copyright to 2009. 2009-05-13 20:04:58 +00:00
Bharat Mediratta
b4c9a97050 Create item helper and move move_item(), remove_album_cover() and
make_album_cover() functions into it.
2009-05-02 20:34:02 +00:00
Bharat Mediratta
0fd82598b5 Move make_album_cover and remove_album_cover out of Item_Model and
into the core helper.  Clean up interactions so that when we remove an
album cover we pick a new one, or clean out the old album cover if
there are no other choices.
2009-05-02 20:14:13 +00:00
Bharat Mediratta
486517fac5 Clean up API to be organized around the functionality it provides, not the feature its provided for. 2009-05-02 19:11:22 +00:00
Bharat Mediratta
d0b8fbef1d Remove extra whitespace. 2009-05-02 19:04:17 +00:00
Bharat Mediratta
fd3d4370d1 Fix indentation. 2009-05-02 18:58:10 +00:00
Tim Almdal
820cbdf1c3 Refactor the creation and removal of the album covers into
make_album_cover and remove_album_cover methods in Item_Model.
Usage: $photo->make_album_cover()  $album->remove_album_cover()
2009-04-29 15:57:29 +00:00
Tim Almdal
33122e8968 Change album cover functionality added 2009-04-29 03:57:24 +00:00
Tim Almdal
89bdd6ca98 The delete button now deletes the selected items 2009-04-29 01:29:39 +00:00
Tim Almdal
12d976b94d 1) Refactor the ajax calls so that the code is reused across multipl
request types.
2) Enable/Disable the drawer handle buttons depending on the number of
items selcted
3) Image rotation works.
2009-04-28 21:29:14 +00:00
Tim Almdal
933770cf0e 1) Fix index overflow issue.
2) Fix where the microthumb was removed even if the move was cancelled
2009-04-22 23:23:15 +00:00
Tim Almdal
475b8fe9ff Dragging from the thumbgrid to an album in the tree now works.
Refactored the javascript to minimize duplication.
2009-04-22 16:09:57 +00:00
Tim Almdal
c94fc344e8 Added progress bar and pause and continue functionality to rearrange 2009-04-21 06:04:03 +00:00
Tim Almdal
e8ea822801 Remove debugging statements 2009-04-20 18:47:38 +00:00
Tim Almdal
ad10584dc1 1) Add rearrange processing as a task
2) Improved drop location determination
3) Add a revert if dropped on an invalid target
4) Add a popup dialog to display ajax errors
Still to do progress bar, pause/continue and status messages
2009-04-20 18:44:19 +00:00