summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2014-02-11 17:45:02 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2014-02-11 17:45:02 +0800
commit5776c2bd08a4018096d833c4dc732d010b6f7e97 (patch)
tree27eae1dd9dc51d31c6701e6f4ceeefa5a4e8adcc
parentc9e693fe6432c2bb146d0e5173c41587a2df2fbe (diff)
downloadpttbbs-5776c2bd08a4018096d833c4dc732d010b6f7e97.tar
pttbbs-5776c2bd08a4018096d833c4dc732d010b6f7e97.tar.gz
pttbbs-5776c2bd08a4018096d833c4dc732d010b6f7e97.tar.bz2
pttbbs-5776c2bd08a4018096d833c4dc732d010b6f7e97.tar.lz
pttbbs-5776c2bd08a4018096d833c4dc732d010b6f7e97.tar.xz
pttbbs-5776c2bd08a4018096d833c4dc732d010b6f7e97.tar.zst
pttbbs-5776c2bd08a4018096d833c4dc732d010b6f7e97.zip
Revert the symlink changes.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5925 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/admin.c10
-rw-r--r--pttbbs/mbbsd/board.c13
2 files changed, 13 insertions, 10 deletions
diff --git a/pttbbs/mbbsd/admin.c b/pttbbs/mbbsd/admin.c
index a4959e43..67f83e4a 100644
--- a/pttbbs/mbbsd/admin.c
+++ b/pttbbs/mbbsd/admin.c
@@ -1027,12 +1027,20 @@ int make_board_link(const char *bname, int gid)
int make_board_link_interactively(int gid)
{
char buf[32];
+ vs_hdr("建立看板連結");
+
+ outs("\n\n請注意: 看板連結會導致連結所在的群組之小組長一樣有群組管理權限。\n"
+ "(例,在群組 A [小組長: abc]下建立了通往群組 B 的看板 C 的連結,\n"
+ " 結果會導致 abc 在進入看板 C 時也有群組管理權限。)\n\n"
+ "這是已知現象而且無解。在建立看板時請確定您已了解可能會發生的問題。\n");
+
+ if (tolower(vmsg("確定要建立新看板連結嗎? [y/N]: ")) != 'y')
+ return -1;
CompleteBoard(msg_bid, buf);
if (!buf[0])
return -1;
- vs_hdr("建立看板連結");
if (make_board_link(buf, gid) < 0) {
vmsg("看板連結建立失敗");
diff --git a/pttbbs/mbbsd/board.c b/pttbbs/mbbsd/board.c
index b6dc566f..665afcab 100644
--- a/pttbbs/mbbsd/board.c
+++ b/pttbbs/mbbsd/board.c
@@ -1154,9 +1154,8 @@ load_boards(char *key)
continue;
if (bptr->brdattr & BRD_SYMBOLIC) {
- /* Let group ops know this is a symlink. */
- if (HasUserPerm(PERM_SYSOP) || HasUserPerm(PERM_SYSSUPERSUBOP)
- || GROUPOP())
+ /* Only SYSOP/SYSSUPERSUBOP knows a board is a link or not. */
+ if (HasUserPerm(PERM_SYSOP) || HasUserPerm(PERM_SYSSUPERSUBOP))
state |= NBRD_SYMBOLIC;
else {
bid = BRD_LINK_TARGET(bptr);
@@ -1890,10 +1889,6 @@ choose_board(int newflag)
assert(0<=num && num<nbrdsize);
ptr = &nbrd[num];
if (ptr->myattr & NBRD_SYMBOLIC) {
- if (GROUPOP() && !HasUserPerm(PERM_SYSOP)) {
- vmsg("此為看板連結。為避免設定錯誤,您無法由此直接進入看板。");
- break;
- }
replace_link_by_target(ptr);
}
}
@@ -1996,10 +1991,10 @@ choose_board(int newflag)
if (IN_CLASS() &&
(HasUserPerm(PERM_SYSOP) ||
(HasUserPerm(PERM_SYSSUPERSUBOP) && GROUPOP()))) {
- if (make_board_link_interactively(class_bid) < 0)
- break;
brdnum = -1;
head = 9999;
+ if (make_board_link_interactively(class_bid) < 0)
+ break;
}
else if (HasFavEditPerm() && IS_LISTING_FAV()) {
if (fav_add_line() == NULL) {