我是用的smth-1.2.1,现在newsmth也还是有这个问题:
俱乐部版面因为不公开,在主菜单的精华公布栏中,板面的目录一般会被设成"SYSOPS",
但这样即使是俱乐部的成员也无法从web下查看精华区。
发现问题在libBBS/libann.c中,修改如下:
@@ -229,6 +229,7 @@
char currpath[256];
FILE *fp;
char board[STRLEN];
+ struct boardheader *bh;
int ret = 0;
/*
@@ -236,15 +237,19 @@
*/
if (path[0] == '/')
return -1;
- if ((ptr = strstr(path, "groups/")) != NULL)
+
+ if ((ptr = strstr(path, "groups/")) != NULL) {
ann_get_board(ptr, board, sizeof(board));
+ bh = getbcache(board);
+ }
else
board[0] = '\0';
bzero(pathbuf, sizeof(pathbuf));
ptr = path;
while (*ptr != '\0') {
- if (*ptr == '/')
+ if (*ptr == '/') {
snprintf(filename, sizeof(filename), "%s/.Names", pathbuf);
+ }
else {
if (i < sizeof(pathbuf))
pathbuf[i] = *ptr;
@@ -272,6 +277,19 @@
continue;
if (strncmp(currpath, path, strlen(currpath)) != 0)
continue;
+
+ /* by Quotation 2005.06.04 俱乐部版面的的精华区访问 */
+ if (bh && board[0] && bh->ann_path
+ && !strcmp(bh->ann_path, currpath + strlen("0Announce/groups/"))) {
+ /* 正好是板面精华区的根目录 */
+ if ((bh->flag & BOARD_CLUB_READ)
+ || (bh->flag & BOARD_CLUB_HIDE)
+ || (bh->title_level != 0)) { /* 是俱乐部板面 */
+ if (check_read_perm(user, bh)) {
+ break; /* 用户有访问俱乐部的权限则不必检查精华区权限 */
+ }
+ }
+ }
/*
* if ((!strstr(title,"(BM: BMS)")||HAS_PERM(currentuser,PERM_BOARDS))&&
* (!strstr(title,"(BM: SYSOPS)")||HAS_PERM(currentuser,PERM_SYSOP))&&
--
FROM 221.221.147.64