[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[3717] branches/1.3



Revision: 3717
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3717&view=rev
Author:   einhverfr
Date:     2011-09-20 05:58:33 +0000 (Tue, 20 Sep 2011)
Log Message:
-----------
minor permissions updates for reconciliation
LaTeX escaping for n and m dashes

Modified Paths:
--------------
    branches/1.3/LedgerSMB/Template/LaTeX.pm
    branches/1.3/LedgerSMB.pm
    branches/1.3/sql/modules/Roles.sql
    branches/1.3/t/11-ledgersmb.t

Modified: branches/1.3/LedgerSMB/Template/LaTeX.pm
===================================================================
--- branches/1.3/LedgerSMB/Template/LaTeX.pm	2011-09-19 23:41:40 UTC (rev 3716)
+++ branches/1.3/LedgerSMB/Template/LaTeX.pm	2011-09-20 05:58:33 UTC (rev 3717)
@@ -99,6 +99,8 @@
 
     if (defined $vars){
             $vars =~ s/([&\$\\_<>~^#\%\{\}])/\\$1/g;
+            $vars =~ s/â/--/g;
+            $vars =~ s/[ââ]/---/g;
             $vars =~ s/"(.*)"/``$1''/gs;
             $vars =~ s/\n/\n\n/gm;
     }

Modified: branches/1.3/LedgerSMB.pm
===================================================================
--- branches/1.3/LedgerSMB.pm	2011-09-19 23:41:40 UTC (rev 3716)
+++ branches/1.3/LedgerSMB.pm	2011-09-20 05:58:33 UTC (rev 3717)
@@ -807,7 +807,7 @@
     my ($self, $args) = @_;
     my @roles = @{$args->{allowed_roles}};
     for my $role (@roles){
-        $self->{_role_prefix} = "" unless defined $self->{_role_prefix};
+        $self->{_role_prefix} = "lsmb_$self->{company}__" unless defined $self->{_role_prefix};
         my @roleset = grep m/^$self->{_role_prefix}$role$/, @{$self->{_roles}};
         if (scalar @roleset){
             return 1;

Modified: branches/1.3/sql/modules/Roles.sql
===================================================================
--- branches/1.3/sql/modules/Roles.sql	2011-09-19 23:41:40 UTC (rev 3716)
+++ branches/1.3/sql/modules/Roles.sql	2011-09-20 05:58:33 UTC (rev 3717)
@@ -658,7 +658,8 @@
 GRANT SELECT ON recon_payee 
 TO "lsmb_<?lsmb dbname ?>__reconciliation_approve";
 
-GRANT UPDATE ON cr_report TO "lsmb_<?lsmb dbname ?>__reconciliation_approve";
+GRANT DELETE ON cr_report_line TO "lsmb_<?lsmb dbname ?>__reconciliation_approve";
+GRANT UPDATE, DELETE ON cr_report TO "lsmb_<?lsmb dbname ?>__reconciliation_approve";
 GRANT SELECT ON acc_trans, account_checkpoint TO 
 "lsmb_<?lsmb dbname ?>__reconciliation_approve";
 

Modified: branches/1.3/t/11-ledgersmb.t
===================================================================
--- branches/1.3/t/11-ledgersmb.t	2011-09-19 23:41:40 UTC (rev 3716)
+++ branches/1.3/t/11-ledgersmb.t	2011-09-20 05:58:33 UTC (rev 3717)
@@ -258,7 +258,8 @@
 
 # $lsmb->is_allowed_role checks, no prefix
 $lsmb = LedgerSMB->new();
-$lsmb->{_roles} = ['apple', 'pear'];
+$lsmb->{_role_prefix} = '1_';
+$lsmb->{_roles} = ['1_apple', '1_pear'];
 is($lsmb->is_allowed_role({allowed_roles => ['pear']}), 1, 
 	'is_allowed_role: allowed role');
 

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.