]> andersk Git - moira.git/commitdiff
Allow members of hidden lists to get_list_info. They still aren't able
authorzacheiss <zacheiss>
Sat, 30 Nov 2002 00:07:49 +0000 (00:07 +0000)
committerzacheiss <zacheiss>
Sat, 30 Nov 2002 00:07:49 +0000 (00:07 +0000)
to get_members_of_list.

server/qaccess.pc

index 801a4d9f75f96427739ecf863db9dea236ffd1c1..dd473bc189aed1e1b6925036672fe45ba6b20d96 100644 (file)
@@ -274,15 +274,15 @@ int access_visible_list(struct query *q, char *argv[], client *cl)
 int access_vis_list_by_name(struct query *q, char *argv[], client *cl)
 {
   EXEC SQL BEGIN DECLARE SECTION;
-  int acl_id, memacl_id, flags, rowcount;
+  int acl_id, memacl_id, flags, rowcount, list_id;
   char acl_type[LIST_ACL_TYPE_SIZE], memacl_type[LIST_ACL_TYPE_SIZE];
   char *listname;
   EXEC SQL END DECLARE SECTION;
   int status;
 
   listname = argv[0];
-  EXEC SQL SELECT hidden, acl_id, acl_type, memacl_id, memacl_type 
-    INTO :flags, :acl_id, :acl_type, :memacl_id, :memacl_type
+  EXEC SQL SELECT hidden, acl_id, acl_type, memacl_id, memacl_type, list_id 
+    INTO :flags, :acl_id, :acl_type, :memacl_id, :memacl_type, :list_id
     FROM list 
     WHERE name = :listname;
 
@@ -294,14 +294,17 @@ int access_vis_list_by_name(struct query *q, char *argv[], client *cl)
   if (!flags)
     return MR_SUCCESS;
 
-  /* check for client in access control list */
+  /* If the user is a member of the acl, memacl, or the list itself,
+   * accept them.
+   */
   status = find_member(acl_type, acl_id, cl);
   if (!status)
-    {
-      status = find_member(memacl_type, memacl_id, cl);
-      if (!status)
-       return MR_PERM;
-    }
+    status = find_member(memacl_type, memacl_id, cl);
+  if (!status)
+    status = find_member("LIST", list_id, cl);
+  if (!status)
+    return MR_PERM;
+
   return MR_SUCCESS;
 }
 
This page took 0.045461 seconds and 5 git commands to generate.