[1626] in Moira
"moira" changes, membership acls
daemon@ATHENA.MIT.EDU (Garry Zacheiss)
Mon Aug 7 04:58:53 2000
Message-Id: <200008070858.EAA16799@alice-whacker.mit.edu>
To: moiradev@MIT.EDU
Date: Mon, 07 Aug 2000 04:58:50 -0400
From: Garry Zacheiss <zacheiss@MIT.EDU>
Part 4 of 4, this time featuring changes to the curses client.
Garry
Index: defs.h
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/moiradev/repository/moira/clients/moira/defs.h,v
retrieving revision 1.17
diff -c -r1.17 defs.h
*** defs.h 2000/06/09 19:35:56 1.17
--- defs.h 2000/08/07 08:41:02
***************
*** 50,56 ****
/* What version of the queries are we asking for? */
! #define QUERY_VERSION 3
/* This is unimplemented in the menu stuff, but would be nice. */
--- 50,56 ----
/* What version of the queries are we asking for? */
! #define QUERY_VERSION 4
/* This is unimplemented in the menu stuff, but would be nice. */
Index: lists.c
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/moiradev/repository/moira/clients/moira/lists.c,v
retrieving revision 1.40
diff -c -r1.40 lists.c
*** lists.c 2000/04/19 23:15:35 1.40
--- lists.c 2000/08/07 08:41:36
***************
*** 45,50 ****
--- 46,53 ----
#define DEFAULT_NFSGROUP DEFAULT_NO
#define DEFAULT_ACE_TYPE "user"
#define DEFAULT_ACE_NAME (user)
+ #define DEFAULT_MEMACE_TYPE "NONE"
+ #define DEFAULT_MEMACE_NAME "NONE"
#define DEFAULT_DESCRIPTION DEFAULT_COMMENT
/* globals only for this file. */
***************
*** 104,109 ****
--- 107,119 ----
Put_message(buf);
}
+ if (strcmp(info[L_MEMACE_TYPE], "NONE"))
+ {
+ sprintf(buf, "The Membership Administrator of this list is the %s: %s",
+ info[L_MEMACE_TYPE], info[L_MEMACE_NAME]);
+ Put_message(buf);
+ }
+
sprintf(buf, "This list is: %s, %s, and %s",
atoi(info[L_ACTIVE]) ? "active" : "inactive",
atoi(info[L_PUBLIC]) ? "public" : "private",
***************
*** 233,238 ****
--- 243,261 ----
if (GetValueFromUser(temp_buf, &info[L_ACE_NAME]) == SUB_ERROR)
return NULL;
}
+
+ 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"))
+ {
+ sprintf(temp_buf, "Which %s will be the membership administrator of this list: ",
+ info[L_MEMACE_TYPE]);
+ if (GetValueFromUser(temp_buf, &info[L_MEMACE_NAME]) == SUB_ERROR)
+ return NULL;
+ }
+
if (GetValueFromUser("Description: ", &info[L_DESC]) == SUB_ERROR)
return NULL;
***************
*** 360,365 ****
--- 383,390 ----
info[L_NFSGROUP] = strdup(DEFAULT_NFSGROUP);
info[L_ACE_TYPE] = strdup(DEFAULT_ACE_TYPE);
info[L_ACE_NAME] = strdup(DEFAULT_ACE_NAME);
+ info[L_MEMACE_TYPE] = strdup(DEFAULT_MEMACE_TYPE);
+ info[L_MEMACE_NAME] = strdup(DEFAULT_MEMACE_NAME);
info[L_DESC] = strdup(DEFAULT_DESCRIPTION);
info[L_MODTIME] = info[L_MODBY] = info[L_MODWITH] = info[L_END] = NULL;
return info;