From d7821cfa1862ce7711e97630b4780d116753413b Mon Sep 17 00:00:00 2001
From: Shiv Kaushal
Date: Tue, 28 Mar 2006 16:31:31 +0000
Subject: [PATCH] Fixed error in new_entry_form
---
org.gridsite.core/CHANGES | 4 ++++
org.gridsite.core/src/grst_admin_gacl.c | 7 ++++---
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/org.gridsite.core/CHANGES b/org.gridsite.core/CHANGES
index 1cb570e..0d1fa98 100644
--- a/org.gridsite.core/CHANGES
+++ b/org.gridsite.core/CHANGES
@@ -1,3 +1,7 @@
+* Tue Mar 28 2006 Shiv Kaushal
+- Fixed bug in GACL admin interface that would cause
+ internal server erorr sometimes when adding new
+ entries to and ACL.
* Sat Mar 25 2006 Shiv Kaushal
- Change delegation header to Proxy-Delegation-Service
instead of Grst-
diff --git a/org.gridsite.core/src/grst_admin_gacl.c b/org.gridsite.core/src/grst_admin_gacl.c
index 2cb517a..bdcccbd 100644
--- a/org.gridsite.core/src/grst_admin_gacl.c
+++ b/org.gridsite.core/src/grst_admin_gacl.c
@@ -188,8 +188,9 @@ void new_entry_form(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm,char *help_u
GRSTgaclEntry *entry;
GRSTgaclNamevalue* namevalue;
- if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden");
+ if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden");
+ entry = GRSTgaclEntryNew();
StartHTML(&bp, dir_uri, dir_path);
StartForm(&bp, dir_uri, dir_path, admin_file, timestamp, "new_entry");
GRSThttpPrintf (&bp, "NEW ENTRY IN ACL FOR %s
\n", dir_uri);
@@ -831,7 +832,7 @@ void GRSTgaclCredTableEnd(GRSTgaclEntry* entry, int entry_no, int admin, int tim
if (strcmp(cmd, "add_cred_form")==0 ||strcmp(cmd, "del_cred_sure")==0) show_perms=0; else show_perms=1;
if (strcmp(cmd, "edit_entry_form")==0 || strcmp(cmd, "new_entry_form")==0) edit_perms=1; else edit_perms=0;
- if (strcmp(cmd, "new_entry_form")==0) blank_perms=1; else blank_perms=0;
+ if (strcmp(cmd, "new_entry_form")==0) blank_perms=1; else blank_perms=0;
// If showing the last row is not required then exit
if (show_perms==0){GRSThttpPrintf (bp,"
\n"); return;}
@@ -842,7 +843,7 @@ void GRSTgaclCredTableEnd(GRSTgaclEntry* entry, int entry_no, int admin, int tim
GRSThttpPrintf (bp, "\n | ");
- if (blank_perms) entry->allowed=entry->denied=GRST_PERM_NONE;
+ if (blank_perms==1)entry->allowed=entry->denied=GRST_PERM_NONE;
// Show Permissions - will produce a list or a list of check boxes depending on whether the permissions are to be edited or not
GRSThttpPrintf (bp, "Allowed: ");
--
1.8.2.3
|