You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by jf...@apache.org on 2014/10/31 14:21:43 UTC

svn commit: r1635764 - in /vcl/trunk/web/.ht-inc: privileges.php utils.php

Author: jfthomps
Date: Fri Oct 31 13:21:42 2014
New Revision: 1635764

URL: http://svn.apache.org/r1635764
Log:
minor changes, no JIRAs for these

utils.php: modified abort: added call to clearPrivCache to clear up errors that may be caused by poorly cached data

privileges.php: modified AJchangeResourcePrivs: added "$newprivval == 'true' to conditional that checks if user has access to modify privilege to make it match up with the comments above it and what is done in getResourcePrivRowHTML

Modified:
    vcl/trunk/web/.ht-inc/privileges.php
    vcl/trunk/web/.ht-inc/utils.php

Modified: vcl/trunk/web/.ht-inc/privileges.php
URL: http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/privileges.php?rev=1635764&r1=1635763&r2=1635764&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/privileges.php (original)
+++ vcl/trunk/web/.ht-inc/privileges.php Fri Oct 31 13:21:42 2014
@@ -2768,7 +2768,8 @@ function AJchangeResourcePrivs() {
 	# checked, and the user is not in the resource owner group, don't allow
 	# the change
 	if($newpriv != "block" && $newpriv != "cascade" && $newpriv != "available" &&
-	   ! array_key_exists($groupdata[$groupid]["ownerid"], $user["groups"])) {
+	   ! array_key_exists($groupdata[$groupid]["ownerid"], $user["groups"]) &&
+	   $newprivval == 'true') {
 		$text = "You do not have rights to modify the submitted privilege for the submitted group.";
 		print "alert('$text');";
 		return;

Modified: vcl/trunk/web/.ht-inc/utils.php
URL: http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/utils.php?rev=1635764&r1=1635763&r2=1635764&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/utils.php (original)
+++ vcl/trunk/web/.ht-inc/utils.php Fri Oct 31 13:21:42 2014
@@ -924,6 +924,10 @@ function abort($errcode, $query="") {
 		print HELPEMAIL . "</a> " . _("for further assistance.  Please include the ");
 		print _("steps you took that led up to this problem in your email message.");
 	}
+
+	// call clearPrivCache in case that helps clear up what caused the error
+	clearPrivCache();
+
 	// release semaphore lock
 	cleanSemaphore();
 	dbDisconnect();