summaryrefslogtreecommitdiffstats
path: root/mbbsd/bbs.c
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-06-19 08:43:54 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-06-19 08:43:54 +0800
commit43f72bad0c2636c4e139c72d36a03274cbb8614c (patch)
treec8b548499973782ec810d08138addeb27588928a /mbbsd/bbs.c
parent8c9d079d0d14d540577a3a3cbf3fdabaac03f569 (diff)
downloadpttbbs-43f72bad0c2636c4e139c72d36a03274cbb8614c.tar
pttbbs-43f72bad0c2636c4e139c72d36a03274cbb8614c.tar.gz
pttbbs-43f72bad0c2636c4e139c72d36a03274cbb8614c.tar.bz2
pttbbs-43f72bad0c2636c4e139c72d36a03274cbb8614c.tar.lz
pttbbs-43f72bad0c2636c4e139c72d36a03274cbb8614c.tar.xz
pttbbs-43f72bad0c2636c4e139c72d36a03274cbb8614c.tar.zst
pttbbs-43f72bad0c2636c4e139c72d36a03274cbb8614c.zip
articles in Security or FILE_BOTTOM should not be edited.
guest should not edit his articles. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2852 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/bbs.c')
-rw-r--r--mbbsd/bbs.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index de7383db..341ad324 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -962,15 +962,16 @@ edit_post(int ent, fileheader_t * fhdr, const char *direct)
fileheader_t postfile;
boardheader_t *bp = getbcache(currbid);
- if (fhdr->filemode&FILE_BOTTOM && strcmp(bp->brdname, "Security") == 0)
+ if ((fhdr->filemode & FILE_BOTTOM) ||
+ strcmp(bp->brdname, "Security") == 0)
return DONOTHING;
if (!HasUserPerm(PERM_SYSOP) &&
- ((bp->brdattr & BRD_VOTEBOARD) || fhdr->filemode & FILE_VOTE))
- return DONOTHING;
-
- if( !HasUserPerm(PERM_SYSOP) &&
- (!CheckPostPerm() || strcmp(fhdr->owner, cuser.userid) != 0) )
+ ((bp->brdattr & BRD_VOTEBOARD) ||
+ (fhdr->filemode & FILE_VOTE) ||
+ !CheckPostPerm() ||
+ strcmp(fhdr->owner, cuser.userid) != 0 ||
+ strcmp(cuser.userid, STR_GUEST) == 0))
return DONOTHING;
if( currmode & MODE_SELECT )