]> andersk Git - moira.git/commitdiff
Warn people if they're making a list owned by 'NONE'.
authorzacheiss <zacheiss>
Wed, 4 Apr 2001 23:19:49 +0000 (23:19 +0000)
committerzacheiss <zacheiss>
Wed, 4 Apr 2001 23:19:49 +0000 (23:19 +0000)
clients/moira/lists.c

index e3295f8d329c44fb8eb99c0c843fd46639c2ee1c..5b8db2db367b91a7765d0e35ec598d86e99cd0a2 100644 (file)
@@ -232,17 +232,26 @@ char **AskListInfo(char **info, Bool name)
        return NULL;
     }
 
-  if (GetTypeFromUser("What Type of Administrator", "ace_type",
-                     &info[L_ACE_TYPE]) == SUB_ERROR)
-    return NULL;
-  if (strcasecmp(info[L_ACE_TYPE], "NONE") &&
-      strcasecmp(info[L_ACE_TYPE], "none"))
-    {
-      sprintf(temp_buf, "Which %s will be the administrator of this list: ",
-             info[L_ACE_TYPE]);
-      if (GetValueFromUser(temp_buf, &info[L_ACE_NAME]) == SUB_ERROR)
-       return NULL;
-    }
+  do {
+    if (GetTypeFromUser("What Type of Administrator", "ace_type",
+                       &info[L_ACE_TYPE]) == SUB_ERROR)
+      return NULL;
+    if (strcasecmp(info[L_ACE_TYPE], "none"))
+      {
+       sprintf(temp_buf, "Which %s will be the administrator of this list: ",
+               info[L_ACE_TYPE]);
+       if (GetValueFromUser(temp_buf, &info[L_ACE_NAME]) == SUB_ERROR)
+         return NULL;
+      }
+    else
+      {
+       Put_message("Setting the administrator of this list to 'NONE'");
+       Put_message("will make you unable to further modify the list.");
+       if (YesNoQuestion("Do you really want to do this?", FALSE) == TRUE)
+         break;
+      }
+  } while (!strcasecmp(info[L_ACE_TYPE], "none"));
+       
   if (!strcasecmp(info[L_ACE_TYPE], "kerberos"))
     {
       char *canon;
@@ -256,8 +265,7 @@ char **AskListInfo(char **info, Bool name)
   if (GetTypeFromUser("What Type of Membership Administrator", "ace_type",
                      &info[L_MEMACE_TYPE]) == SUB_ERROR)
     return NULL;
-  if (strcasecmp(info[L_MEMACE_TYPE], "NONE") &&
-      strcasecmp(info[L_MEMACE_TYPE], "none"))
+  if (strcasecmp(info[L_MEMACE_TYPE], "none"))
     {
       sprintf(temp_buf, "Which %s will be the membership administrator of this list: ",
              info[L_MEMACE_TYPE]);
This page took 0.225595 seconds and 5 git commands to generate.