File tree Expand file tree Collapse file tree 4 files changed +6
-4
lines changed
Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,9 @@ static function getInvoice($invoice_id) {
6969 global $ user ;
7070 $ mdb2 = getConnection ();
7171
72- $ sql = "select * from tt_invoices where id = $ invoice_id and team_id = $ user ->team_id and status = 1 " ;
72+ if ($ user ->isClient ()) $ client_part = " and client_id = $ user ->client_id " ;
73+
74+ $ sql = "select * from tt_invoices where id = $ invoice_id and team_id = $ user ->team_id $ client_part and status = 1 " ;
7375 $ res = $ mdb2 ->query ($ sql );
7476 if (!is_a ($ res , 'PEAR_Error ' )) {
7577 if ($ val = $ res ->fetchRow ())
Original file line number Diff line number Diff line change 1212 <br >
1313 <table cellspacing =" 0" cellpadding =" 4" width =" 100%" border =" 0" >
1414 <tr >
15- <td align =" center" >  ; Anuko Time Tracker 1.17.40.4064 | Copyright © ; <a href =" https://www.anuko.com/lp/tt_3.htm" target =" _blank" >Anuko</a > |
15+ <td align =" center" >  ; Anuko Time Tracker 1.17.41.4065 | Copyright © ; <a href =" https://www.anuko.com/lp/tt_3.htm" target =" _blank" >Anuko</a > |
1616 <a href =" https://www.anuko.com/lp/tt_4.htm" target =" _blank" >{ $i18n .footer.credits} </a > |
1717 <a href =" https://www.anuko.com/lp/tt_5.htm" target =" _blank" >{ $i18n .footer.license} </a > |
1818 <a href =" https://www.anuko.com/lp/tt_7.htm" target =" _blank" >{ $i18n .footer.improve} </a >
Original file line number Diff line number Diff line change 3232import ('ttSysConfig ' );
3333
3434// Access check.
35- if (!ttAccessAllowed ('manage_invoices ' ) || !$ user ->isPluginEnabled ('iv ' )) {
35+ if (!( ttAccessAllowed ('manage_invoices ' ) || ttAccessAllowed ( ' view_own_invoices ' ) ) || !$ user ->isPluginEnabled ('iv ' )) {
3636 header ('Location: access_denied.php ' );
3737 exit ();
3838}
Original file line number Diff line number Diff line change 3333import ('form.Form ' );
3434
3535// Access check.
36- if (!ttAccessCheck (right_view_invoices ) || !$ user ->isPluginEnabled ('iv ' )) {
36+ if (!( ttAccessAllowed ( ' manage_invoices ' ) || ttAccessAllowed ( ' view_own_invoices ' ) ) || !$ user ->isPluginEnabled ('iv ' )) {
3737 header ('Location: access_denied.php ' );
3838 exit ();
3939}
You can’t perform that action at this time.
0 commit comments