*/
void display_whok(void);
+int ConditionalHaveRoomeditRights(StrBuf *Target, WCTemplputParams *TP);
/*
* Initialize the viewdefs with localized strings
wc_printf("</td>\n");
wc_printf("<td> </td>\n");
- if ( (WC->axlevel >= 6) || (WC->is_room_aide) ) {
+ if ( ConditionalHaveRoomeditRights(NULL, NULL)) {
wc_printf("<td class=\"");
if (!strcmp(tab, "config")) {
int er_floor;
int er_num_type;
int er_view;
+ wcsession *WCC = WC;
if (!havebstr("ok_button")) {
strcpy(WC->ImportantMessage,
serv_getln(buf, sizeof buf);
if (buf[0] != '2') {
- strcpy(WC->ImportantMessage, &buf[4]);
+ strcpy(WCC->ImportantMessage, &buf[4]);
display_main_menu();
return;
}
- /** TODO: Room created, now udate the left hand icon bar for this user */
+ /** TODO: Room created, now update the left hand icon bar for this user */
burn_folder_cache(0); /* burn the old folder cache */
-
gotoroom(er_name);
- do_change_view(er_view); /* Now go there */
+
+ serv_printf("VIEW %d", er_view);
+ serv_getln(buf, sizeof buf);
+ WCC->CurRoom.view = er_view;
+
+ if (WCC->is_aide || WCC->is_room_aide)
+ display_editroom ();
+ else
+ do_change_view(er_view); /* Now go there */
+
}
int ConditionalRoomAide(StrBuf *Target, WCTemplputParams *TP)
{
wcsession *WCC = WC;
- return (WCC != NULL)? (WCC->is_room_aide == 0) : 0;
+ return (WCC != NULL)?
+ ((WCC->CurRoom.RAFlags & UA_ADMINALLOWED) != 0) : 0;
}
int ConditionalRoomAcessDelete(StrBuf *Target, WCTemplputParams *TP)
{
wcsession *WCC = WC;
return (WCC == NULL)? 0 :
- ( (WCC->is_room_aide) || /////TODO!
+ ( ((WCC->CurRoom.RAFlags & UA_ADMINALLOWED) != 0) ||
(WCC->CurRoom.is_inbox) ||
(WCC->CurRoom.QRFlags2 & QR2_COLLABDEL) );
}
return ( (WCC!= NULL) &&
((WCC->axlevel >= 6) ||
- (WCC->is_room_aide) ||
+ ((WCC->CurRoom.RAFlags & UA_ADMINALLOWED) != 0) ||
(WCC->CurRoom.is_inbox) ));
}