Commit Graph

28 Commits

Author SHA1 Message Date
Shai Ben-Naphtali
5a0424f458 Fix some consistency in text.
This fixes ticket #546

Signed-off-by: Bharat Mediratta <bharat@menalto.com>
2009-07-21 13:18:59 +08: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
5b3b675b6d Non-trivial changes to the event handling code:
1) The item_updated event no longer takes the old and new items.
   Instead we overload ORM to track the original data and make
   that available via the item.  This will allow us to move event
   publishing down into the API methods which in turn will give us
   more stability since we won't require each controller to remember
   to do it.

2) ORM class now tracks the original values.  It doesn't track
   the original relationships (no need for that, yet)

3) Added new events:
     item_deleted
     group_deleted
     user_deleted
2009-07-16 11:19:34 -07:00
Tim Almdal
54ffea2419 Split the clean method into two clean and purify. clean is a light weight
approach using html::specialchars and purify uses HTMLPurifier to intelligently
cleanse the output fields. Use purifier for text and title fields where it is
likely that a user would enter html to format their data.
2009-07-03 21:44:10 -07:00
Bharat Mediratta
8f9a943f55 Fix a bunch of XSS vulnerabilities turned up by manual inspection
using the checklist in ticket #385.
2009-07-01 17:57:39 -07:00
Bharat Mediratta
dd854379c2 Sanitize all data we return via json_encode() to guard against XSS and
other data leaks.
2009-06-03 17:08:23 -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
88a3d43ba9 Update all references to the core application to now point to the
gallery module.  This type of mass update is prone to some small bugs.
2009-05-27 16:17:29 -07:00
Tim Almdal
908618960b Since organize is now in the preview stage and will probably be
rewritten by beta2, pull all of its "tenticles" back into itself and
out of core or tags module.
2009-05-26 14:43:31 +00:00
Tim Almdal
762ca22544 This takes us the next step closer to providing bulk edit. We still
can't edit, but we are getting closer :-).
This change sets up a framework for modules to contribute edit panels
to the organize drawer. Currently implemented General (albums and
photos), Sort Order (albums only) and Manage Tags
2009-05-18 19:34:03 +00:00
Bharat Mediratta
5495037a3d Gee it's May already. Update copyright to 2009. 2009-05-13 20:04:58 +00:00
Chad Kieffer
eb9162f6c4 Remove angled ends of edit drawer handle. 2009-05-02 06:34:05 +00:00
Chad Kieffer
590eceaf93 Set organize messages to use existing gMessage, added album cover message. 2009-05-01 05:35:56 +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
091fde3e00 Another iteration of the organize module:
Rearrange the layout as per discussion with thumb, start the drawer
functionality. Still to do... 
1) Add the processing behind the buttons on the drawer handle
2) Enable the drawer buttons when something is selected
3) Create a copy of the thumbs for the drawer
4) Add the bulk editting functionality to the drawer
2009-04-27 20:30:46 +00:00
Tim Almdal
465182e58f 1) Move the progress bar to a dialog
2) Provide status and error messages back to the user
2009-04-23 20:48:09 +00:00
Tim Almdal
b1a15f2130 Implement a cancel button so that if an organize task is paused, it
can be cancelled.
2009-04-23 04:53:48 +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
9d31564b7c 1) Disable drag when the rearrange task is running
2) Add the album name to the task name
2009-04-21 18:11:27 +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
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
Tim Almdal
aaec040716 - Improve the movement of the placeholder
- Make sure the thumbgrid will utoscroll when dragging
- And an ordinal attribute to the thumbnail when generated, based on the
current sort order of the album.
2009-04-19 03:51:29 +00:00
Tim Almdal
1a332009c7 Change how mutiple requests for micro thumbnails is handler.
handle the edge cases where the draggable is dropped on the micro
thumbnail panel
2009-04-17 20:17:53 +00:00
Tim Almdal
16db338145 Fix typo that was causing an error 2009-04-17 14:33:09 +00:00
Tim Almdal
15fc9b9399 Get the preamble right so the unit test passes 2009-04-05 16:48:20 +00:00
Tim Almdal
f1cb43430b First iteration of the organize functionality (orginally called bulk
edit).  There is limited functionality in no edits work.  This is
primary a chance for the team to review the ui.  It is in a separate
module to isolate the changes.  Eventually, it will be moved back into core.
2009-04-03 00:50:43 +00:00