"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "modules/imap/imap_acl.c" between
citadel-8.24.tar.gz and citadel-9.01.tar.gz

About: Citadel is an advanced messaging and collaboration system for groupware and BBS applications (preferred OS: Linux).

imap_acl.c  (citadel-8.24):imap_acl.c  (citadel-9.01)
skipping to change at line 170 skipping to change at line 170
return; return;
} }
/* /*
* CtdlUserGoto() formally takes us to the desired room. (If another * CtdlUserGoto() formally takes us to the desired room. (If another
* folder is selected, save its name so we can return there!!!!!) * folder is selected, save its name so we can return there!!!!!)
*/ */
if (IMAP->selected) { if (IMAP->selected) {
strcpy(savedroom, CC->room.QRname); strcpy(savedroom, CC->room.QRname);
} }
CtdlUserGoto(roomname, 0, 0, &msgs, &new); CtdlUserGoto(roomname, 0, 0, &msgs, &new, NULL, NULL);
IAPuts("* ACL "); IAPuts("* ACL ");
IPutCParamStr(2); IPutCParamStr(2);
/* /*
* Traverse the userlist * Traverse the userlist
*/ */
rights = NewStrBuf(); rights = NewStrBuf();
cdb_rewind(CDB_USERS); cdb_rewind(CDB_USERS);
while (cdbus = cdb_next_item(CDB_USERS), cdbus != NULL) while (cdbus = cdb_next_item(CDB_USERS), cdbus != NULL)
{ {
memset(&temp, 0, sizeof temp); memset(&temp, 0, sizeof temp);
memcpy(&temp, cdbus->ptr, sizeof temp); memcpy(&temp, cdbus->ptr, sizeof temp);
cdb_free(cdbus); cdb_free(cdbus);
CtdlRoomAccess(&CC->room, &temp, &ra, NULL); CtdlRoomAccess(&CC->room, &temp, &ra, NULL);
if (!IsEmptyStr(temp.fullname)) { if (!IsEmptyStr(temp.fullname)) {
imap_acl_flags(rights, ra); imap_acl_flags(rights, ra);
if (StrLength(rights) > 0) { if (StrLength(rights) > 0) {
IAPuts(" "); IAPuts(" ");
plain_imap_strout(temp.fullname); IPutStr(temp.fullname, strlen(temp.fullname));
IAPuts(" "); IAPuts(" ");
iaputs(SKEY( rights)); iaputs(SKEY( rights));
} }
} }
} }
FreeStrBuf(&rights); FreeStrBuf(&rights);
IAPuts("\r\n"); IAPuts("\r\n");
/* /*
* If another folder is selected, go back to that room so we can resume * If another folder is selected, go back to that room so we can resume
* our happy day without violent explosions. * our happy day without violent explosions.
*/ */
if (IMAP->selected) { if (IMAP->selected) {
CtdlUserGoto(savedroom, 0, 0, &msgs, &new); CtdlUserGoto(savedroom, 0, 0, &msgs, &new, NULL, NULL);
} }
IReply("OK GETACL completed"); IReply("OK GETACL completed");
} }
/* /*
* Implements the LISTRIGHTS command. * Implements the LISTRIGHTS command.
*/ */
void imap_listrights(int num_parms, ConstStr *Params) { void imap_listrights(int num_parms, ConstStr *Params) {
char roomname[ROOMNAMELEN]; char roomname[ROOMNAMELEN];
char savedroom[ROOMNAMELEN]; char savedroom[ROOMNAMELEN];
int msgs, new; int msgs, new;
int ret; int ret;
struct recptypes *valid; recptypes *valid;
struct ctdluser temp; struct ctdluser temp;
if (num_parms != 4) { if (num_parms != 4) {
IReply("BAD usage error"); IReply("BAD usage error");
return; return;
} }
/* /*
* Search for the specified room/folder * Search for the specified room/folder
*/ */
skipping to change at line 259 skipping to change at line 259
return; return;
} }
/* /*
* CtdlUserGoto() formally takes us to the desired room. (If another * CtdlUserGoto() formally takes us to the desired room. (If another
* folder is selected, save its name so we can return there!!!!!) * folder is selected, save its name so we can return there!!!!!)
*/ */
if (IMAP->selected) { if (IMAP->selected) {
strcpy(savedroom, CC->room.QRname); strcpy(savedroom, CC->room.QRname);
} }
CtdlUserGoto(roomname, 0, 0, &msgs, &new); CtdlUserGoto(roomname, 0, 0, &msgs, &new, NULL, NULL);
/* /*
* Now output the list of rights * Now output the list of rights
*/ */
IAPuts("* LISTRIGHTS "); IAPuts("* LISTRIGHTS ");
IPutCParamStr(2); IPutCParamStr(2);
IAPuts(" "); IAPuts(" ");
IPutCParamStr(3); IPutCParamStr(3);
IAPuts(" "); IAPuts(" ");
IPutStr(HKEY("")); /* FIXME ... do something here */ IPutStr(HKEY("")); /* FIXME ... do something here */
IAPuts("\r\n"); IAPuts("\r\n");
/* /*
* If another folder is selected, go back to that room so we can resume * If another folder is selected, go back to that room so we can resume
* our happy day without violent explosions. * our happy day without violent explosions.
*/ */
if (IMAP->selected) { if (IMAP->selected) {
CtdlUserGoto(savedroom, 0, 0, &msgs, &new); CtdlUserGoto(savedroom, 0, 0, &msgs, &new, NULL, NULL);
} }
IReply("OK LISTRIGHTS completed"); IReply("OK LISTRIGHTS completed");
return; return;
} }
/* /*
* Implements the MYRIGHTS command. * Implements the MYRIGHTS command.
*/ */
void imap_myrights(int num_parms, ConstStr *Params) { void imap_myrights(int num_parms, ConstStr *Params) {
skipping to change at line 313 skipping to change at line 313
return; return;
} }
/* /*
* CtdlUserGoto() formally takes us to the desired room. (If another * CtdlUserGoto() formally takes us to the desired room. (If another
* folder is selected, save its name so we can return there!!!!!) * folder is selected, save its name so we can return there!!!!!)
*/ */
if (IMAP->selected) { if (IMAP->selected) {
strcpy(savedroom, CC->room.QRname); strcpy(savedroom, CC->room.QRname);
} }
CtdlUserGoto(roomname, 0, 0, &msgs, &new); CtdlUserGoto(roomname, 0, 0, &msgs, &new, NULL, NULL);
CtdlRoomAccess(&CC->room, &CC->user, &ra, NULL); CtdlRoomAccess(&CC->room, &CC->user, &ra, NULL);
rights = NewStrBuf(); rights = NewStrBuf();
imap_acl_flags(rights, ra); imap_acl_flags(rights, ra);
IAPuts("* MYRIGHTS "); IAPuts("* MYRIGHTS ");
IPutCParamStr(2); IPutCParamStr(2);
IAPuts(" "); IAPuts(" ");
IPutStr(SKEY(rights)); IPutStr(SKEY(rights));
IAPuts("\r\n"); IAPuts("\r\n");
FreeStrBuf(&rights); FreeStrBuf(&rights);
/* /*
* If a different folder was previously selected, return there now. * If a different folder was previously selected, return there now.
*/ */
if ( (IMAP->selected) && (strcasecmp(roomname, savedroom)) ) { if ( (IMAP->selected) && (strcasecmp(roomname, savedroom)) ) {
CtdlUserGoto(savedroom, 0, 0, &msgs, &new); CtdlUserGoto(savedroom, 0, 0, &msgs, &new, NULL, NULL);
} }
IReply("OK MYRIGHTS completed"); IReply("OK MYRIGHTS completed");
return; return;
} }
 End of changes. 8 change blocks. 
8 lines changed or deleted 8 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS