[Bps-public-commit] App-Changeloggr branch, master, updated. cc9651af841207750b501c7afc5d92f0f0e2fdb2

sartak at bestpractical.com sartak at bestpractical.com
Thu Feb 26 22:49:45 EST 2009


The branch, master has been updated
       via  cc9651af841207750b501c7afc5d92f0f0e2fdb2 (commit)
      from  12d11bbb66e293c6ac6ffff9b7dc6d237c885756 (commit)

Summary of changes:
 lib/App/Changeloggr/Model/Changelog.pm |    4 +++-
 lib/App/Changeloggr/View.pm            |    3 +--
 2 files changed, 4 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit cc9651af841207750b501c7afc5d92f0f0e2fdb2
Author: Shawn M Moore <sartak at gmail.com>
Date:   Thu Feb 26 22:49:32 2009 -0500

    We need to actually render the id of the changelog. arrrgh

diff --git a/lib/App/Changeloggr/Model/Changelog.pm b/lib/App/Changeloggr/Model/Changelog.pm
index ac077b0..22bcbb9 100644
--- a/lib/App/Changeloggr/Model/Changelog.pm
+++ b/lib/App/Changeloggr/Model/Changelog.pm
@@ -17,6 +17,7 @@ use App::Changeloggr::Record schema {
     column admin_token =>
         type is 'text',
         is immutable,
+        render as 'hidden',
         default is defer { _generate_admin_token() };
 };
 
@@ -32,7 +33,8 @@ sub current_user_can {
 
     # anyone can create and read changelogs (except admin token)
     return 1 if $right eq 'create'
-             || ($right eq 'read' && $args{column} ne 'admin_token');
+#             || ($right eq 'read' && $args{column} ne 'admin_token');
+             || $right eq 'read';
 
     # but not delete or update. those must happen as root
     return $self->SUPER::current_user_can($right, %args);
diff --git a/lib/App/Changeloggr/View.pm b/lib/App/Changeloggr/View.pm
index 30bf458..12fa66c 100644
--- a/lib/App/Changeloggr/View.pm
+++ b/lib/App/Changeloggr/View.pm
@@ -36,8 +36,7 @@ template '/changelog/admin' => page {
 
     my $update = $changelog->as_update_action;
     form {
-        render_action($update => ['name', 'done']);
-        render_param($update => 'admin_token' => render_as => 'hidden');
+        render_action($update);
         form_submit(label => 'Update');
     };
 };

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list