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

SF.net SVN: ledger-smb:[5057] trunk/LedgerSMB/Scripts/configuration.pm



Revision: 5057
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5057&view=rev
Author:   einhverfr
Date:     2012-07-29 10:23:48 +0000 (Sun, 29 Jul 2012)
Log Message:
-----------
Permissions check for 1.4 on saving settings

Modified Paths:
--------------
    trunk/LedgerSMB/Scripts/configuration.pm

Modified: trunk/LedgerSMB/Scripts/configuration.pm
===================================================================
--- trunk/LedgerSMB/Scripts/configuration.pm	2012-07-29 10:20:35 UTC (rev 5056)
+++ trunk/LedgerSMB/Scripts/configuration.pm	2012-07-29 10:23:48 UTC (rev 5057)
@@ -196,6 +196,11 @@
 
 sub save_defaults {
     my ($request) = @_;
+    if (!$request->is_allowed_role(
+        {allowed_roles => ['system_settings_change'] })
+    ){
+       die $locale->text('Access Denied');
+    }
     my $setting_handle = LedgerSMB::Setting->new({base => $request});
     my @defaults;
     for my $dg (@default_settings){

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