[Bps-public-commit] jifty-plugin-recordhistory branch, master, updated. 5d7dddf810b07dd8e26f6db3664821cc46b49d0e

Shawn Moore sartak at bestpractical.com
Wed Feb 2 20:19:38 EST 2011


The branch, master has been updated
       via  5d7dddf810b07dd8e26f6db3664821cc46b49d0e (commit)
      from  16c641775eb4d1fe7b79e990557707015e902003 (commit)

Summary of changes:
 .../Plugin/RecordHistory/Model/Transaction.pm      |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit 5d7dddf810b07dd8e26f6db3664821cc46b49d0e
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Feb 2 20:19:31 2011 -0500

    Txn->delegate_current_user_can

diff --git a/lib/Jifty/Plugin/RecordHistory/Model/Transaction.pm b/lib/Jifty/Plugin/RecordHistory/Model/Transaction.pm
index 9f71ae6..c27040b 100644
--- a/lib/Jifty/Plugin/RecordHistory/Model/Transaction.pm
+++ b/lib/Jifty/Plugin/RecordHistory/Model/Transaction.pm
@@ -16,5 +16,15 @@ sub record {
     return $record;
 }
 
+sub delegate_current_user_can {
+    my $self  = shift;
+    my $right = shift;
+    my %args  = @_;
+
+    $right = 'update' if $right ne 'read';
+
+    return $self->record->current_user_can($right);
+}
+
 1;
 

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



More information about the Bps-public-commit mailing list