Added missing check to see if a user is allowed to post or reply a message

This commit is contained in:
Michiel Broek 2007-10-05 19:29:23 +00:00
parent 9eda6976f6
commit 44b2e83fe0
3 changed files with 15 additions and 3 deletions

View File

@ -3,6 +3,10 @@ $Id$
v0.91.12 24-Sep-2007 v0.91.12 24-Sep-2007
mbsebbs:
Added missing check to see if a user is allowed to post or
reply a message.
v0.91.11 02-Sep-2007 - 24-Sep-2007 v0.91.11 02-Sep-2007 - 24-Sep-2007

2
TODO
View File

@ -34,8 +34,6 @@ everything:
limitations. A php API should be added too. limitations. A php API should be added too.
mbsebbs: mbsebbs:
U: Users can post messages while there level is too low.
W: OLR, implement file requests. W: OLR, implement file requests.
N: Only count posted messages in local mail areas. N: Only count posted messages in local mail areas.

View File

@ -133,8 +133,18 @@ int Post_Allowed(void);
int Post_Allowed(void) int Post_Allowed(void)
{ {
if (msgs.MsgKinds == RONLY) { if (msgs.MsgKinds == RONLY) {
/* Message area is Readonly */ Enter(2);
/* Posting not allowed, this area is Read Only! */
pout(LIGHTRED, BLACK, (char *) Language(437)); pout(LIGHTRED, BLACK, (char *) Language(437));
Enter(1);
sleep(3);
return FALSE;
}
if (Access(exitinfo.Security, msgs.WRSec) == FALSE) {
Enter(2);
/* No Write access to area */
pout(LIGHTRED, BLACK, (char *) Language(453));
Enter(1);
sleep(3); sleep(3);
return FALSE; return FALSE;
} }