From a29322d6a2e8145fe3b836bc3702c43a2895def8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Wed, 14 Jul 2010 22:23:18 +0000 Subject: [PATCH] * remove is_room_aide, its not filled anymore. * instead of is_room_aide evaluate room->RAFlags & UA_ADMINALLOWED --- webcit/roomops.c | 10 ++++++---- webcit/webcit.h | 1 - 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/webcit/roomops.c b/webcit/roomops.c index e15b0c47e..5b9840cc6 100644 --- a/webcit/roomops.c +++ b/webcit/roomops.c @@ -16,6 +16,7 @@ char *viewdefs[9]; /* the different kinds of available views */ */ void display_whok(void); +int ConditionalHaveRoomeditRights(StrBuf *Target, WCTemplputParams *TP); /* * Initialize the viewdefs with localized strings @@ -1114,7 +1115,7 @@ void display_editroom(void) wc_printf("\n"); wc_printf(" \n"); - if ( (WC->axlevel >= 6) || (WC->is_room_aide) ) { + if ( ConditionalHaveRoomeditRights(NULL, NULL)) { wc_printf("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) ); } @@ -3200,7 +3202,7 @@ int ConditionalHaveRoomeditRights(StrBuf *Target, WCTemplputParams *TP) return ( (WCC!= NULL) && ((WCC->axlevel >= 6) || - (WCC->is_room_aide) || + ((WCC->CurRoom.RAFlags & UA_ADMINALLOWED) != 0) || (WCC->CurRoom.is_inbox) )); } diff --git a/webcit/webcit.h b/webcit/webcit.h index 1d632d476..e1b1f747c 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -511,7 +511,6 @@ struct wcsession { StrBuf *httpauth_pass; /* only for GroupDAV sessions */ int axlevel; /* this user's access level */ int is_aide; /* nonzero == this user is an Aide */ - int is_room_aide; /* nonzero == this user is a Room Aide in this room */ int connected; /* nonzero == we are connected to Citadel */ int logged_in; /* nonzero == we are logged in */ int need_regi; /* This user needs to register. */ -- 2.30.2