]> andersk Git - moira.git/commitdiff
Don't allow a list to be deleted if it's still the owner or memacl of a
authorzacheiss <zacheiss>
Thu, 13 Sep 2001 02:52:02 +0000 (02:52 +0000)
committerzacheiss <zacheiss>
Thu, 13 Sep 2001 02:52:02 +0000 (02:52 +0000)
container.

server/qsetup.pc

index 4935b3875a306721462ee398ef7e6b9e0af8a90e..5ef3d54c83e5577a369608b8205900a2cbaca098 100644 (file)
@@ -506,6 +506,16 @@ int setup_dlis(struct query *q, char *argv[], client *cl)
   if (cnt > 0)
     return MR_IN_USE;
 
+  EXEC SQL SELECT count(name) INTO :cnt FROM containers
+    WHERE acl_id = :id AND acl_type = 'LIST';
+  if (cnt > 0)
+    return MR_IN_USE;
+
+  EXEC SQL SELECT count(name) INTO :cnt FROM containers
+    WHERE memacl_id = :id AND memacl_type = 'LIST';
+  if (cnt > 0)
+    return MR_IN_USE;
+
   return MR_SUCCESS;
 }
 
This page took 0.105741 seconds and 5 git commands to generate.