From 5776c2bd08a4018096d833c4dc732d010b6f7e97 Mon Sep 17 00:00:00 2001 From: piaip Date: Tue, 11 Feb 2014 09:45:02 +0000 Subject: Revert the symlink changes. git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5925 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- pttbbs/mbbsd/admin.c | 10 +++++++++- pttbbs/mbbsd/board.c | 13 ++++--------- 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 && nummyattr & 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) { -- cgit v1.2.3