[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5053] trunk
- Subject: SF.net SVN: ledger-smb:[5053] trunk
- From: ..hidden..
- Date: Sat, 28 Jul 2012 01:08:44 +0000
Revision: 5053
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5053&view=rev
Author: einhverfr
Date: 2012-07-28 01:08:44 +0000 (Sat, 28 Jul 2012)
Log Message:
-----------
Merging from branches/1.3
Modified Paths:
--------------
trunk/Changelog
trunk/LedgerSMB/Form.pm
trunk/sql/modules/Roles.sql
Property Changed:
----------------
trunk/
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3:3711-5043
+ /branches/1.3:3711-5052
Modified: trunk/Changelog
===================================================================
--- trunk/Changelog 2012-07-28 01:01:55 UTC (rev 5052)
+++ trunk/Changelog 2012-07-28 01:08:44 UTC (rev 5053)
@@ -93,6 +93,8 @@
* Fixed internal server errors with date parsing (Chris T, 3546698)
* Fixed "Directory Transversal Not Allowed w/fs_cssdir (Chris T, h/t Robert C)
* Fixed customer/vendor cleared on ship/receive update (Chris T, 3548104)
+* Fixed insufficient permissions check in System/Defaults (Chris T)
+* Added missing ap_transaction_all role (Chris T, h/t Erik H)
Changelog for 1.3.20
* Fixes for es_AR translation, duplicate keys removed (Andres B)
Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm 2012-07-28 01:01:55 UTC (rev 5052)
+++ trunk/LedgerSMB/Form.pm 2012-07-28 01:08:44 UTC (rev 5053)
@@ -1306,7 +1306,11 @@
# Roles tracking
$self->{_roles} = [];
$query = "select rolname from pg_roles
- where pg_has_role(SESSION_USER, 'USAGE')";
+ where pg_has_role(rolname, 'USAGE')
+ and rolname like
+ coalesce((select value from defaults
+ where setting_key = 'role_prefix'),
+ 'lsmb_' || current_database() || '__') || '%'";
$sth = $dbh->prepare($query);
$sth->execute();
while (my @roles = $sth->fetchrow_array){
Modified: trunk/sql/modules/Roles.sql
===================================================================
--- trunk/sql/modules/Roles.sql 2012-07-28 01:01:55 UTC (rev 5052)
+++ trunk/sql/modules/Roles.sql 2012-07-28 01:08:44 UTC (rev 5053)
@@ -529,6 +529,13 @@
WITH INHERIT NOLOGIN
IN ROLE "lsmb_<?lsmb dbname ?>__contact_read";
+CREATE ROLE "lsmb_<?lsmb dbname ?>__ap_transaction_all"
+WITH INHERIT NOLOGIN
+IN ROLE "lsmb_<?lsmb dbname ?>__ap_transaction_create",
+"lsmb_<?lsmb dbname ?>__ap_invoice_create",
+"lsmb_<?lsmb dbname ?>__ap_transaction_list",
+"lsmb_<?lsmb dbname ?>__file_attach_tx";
+
-- Role created later; using the GRANT construct, we support upgrades
GRANT "lsmb_<?lsmb dbname ?>__exchangerate_edit"
TO "lsmb_<?lsmb dbname ?>__purchase_order_create";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.