Commit Graph

11 Commits

Author SHA1 Message Date
Bharat Mediratta
d5ee5741f2 Don't allow renaming of the root album. 2009-06-23 14:08:07 -07:00
Tim Almdal
1dccc0286f Change the page.html file so that if the type of page is login, the sidebar contents are are not shown 2009-06-16 22:09:02 -07:00
Bharat Mediratta
79582ee5bf Fix up the titles in the default theme. They've been broken for a
while.  This fixes ticket #342.

The bug is that we were using $item instead of $theme->item().  But we
were also not special casing tags properly, and they are effectively
first class citizens (at least for now) so treat them properly.  Also,
set page_title by default in the theme so that we don't have to do an
empty() check on it (makes the theme easier to read) and move the
title out of Tags_Controller so that the theme has more control over
it.
2009-06-15 18:15:41 -07:00
Bharat Mediratta
798444f40b Replace login_page.html.php with the form, wrapped in our default page
type.
2009-06-09 19:45:15 -07:00
Tim Almdal
b276eaa68b Add some window dressing to login_page.html in order to make it more in line
with the overall look of the Gallery3 theme

Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-06-10 08:39:47 +08:00
Tim Almdal
a4a38ba760 Created not_authorized.html.php which is a prettier login screen if the root
album is not publicly browsable.

Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-06-10 08:39:45 +08:00
Tim Almdal
3c3a65b5a7 Rather than just displaying the "unformatted" login screen when the root album
is not viewable by a guest, display the root album as if it was empty. When
the page finishes loading force the login dialog to be displayed.

Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-06-09 22:22:57 +08: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
df51ea7fa4 Fix broken html::script() and url::file() references to the newly
moved gallery module.
2009-05-28 00:06:38 -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
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