1
Guido83
Sorry, no permission...
  • 2004/9/22 9:53

  • Guido83

  • Just popping in

  • Posts: 60

  • Since: 2003/12/7


Hi all,
In my recently installed news v1.21 module I have encountered a problem. When anonymous or registered users click the 'read more...' button, they get the "Sorry, you don't have permission... etc." message.
Ofcourse I've tried setting the permissions at system admin --> groups, but that didn't work.
Does anyone know what causes this problem?
Thanks!

2
Guido83
Re: Sorry, no permission...
  • 2004/9/27 22:11

  • Guido83

  • Just popping in

  • Posts: 60

  • Since: 2003/12/7


Anyone at all?

3
nts81
Re: Sorry, no permission...
  • 2004/10/1 13:22

  • nts81

  • Just popping in

  • Posts: 3

  • Since: 2004/9/26


hi Guido,

same problem happens to me, and what I did was to force it a little bit. There should be an easier way in the admin section, but as I'm rather new to Xoops, I just did it my way. Well, I just commented the lines that checked the permissions for news module, therefore, anyone will be able to see it.
Open modules\news\
Find index.php and find this piece code :

if (!$gperm_handler->checkRight('news_view', $_GET['storytopic'], $groups, $xoopsModule->getVar('mid'))) {
redirect_header('index.php', 3, _NOPERM);
exit();
Comment the 2 lines redirect and exit so it should look like this :
//redirect_header('index.php', 3, _NOPERM);
// exit();

then open modules\news\articles.php, search for :

$storyid = (isset($_GET['storyid'])) ? intval($_GET['storyid']) : 0;
if (empty($storyid)) {
redirect_header("index.php",2,_NW_NOSTORY);
exit();
}

$myts =& MyTextSanitizer::getInstance();
// set comment mode if not set

$article = new NewsStory($storyid);
if ( $article->published() == 0 || $article->published() > time() ) {
redirect_header('index.php', 2, _NW_NOSTORY);
exit();
}
$gperm_handler =& xoops_gethandler('groupperm');
if (is_object($xoopsUser)) {
$groups = $xoopsUser->getGroups();
} else {
$groups = XOOPS_GROUP_ANONYMOUS;
}
if (!$gperm_handler->checkRight("news_view", $article->topicid(), $groups, $xoopsModule->getVar('mid'))) {
redirect_header('index.php', 3, _NOPERM);
exit();
}

Do the same (comment) as in the first example.

HTH,

Chris

Login

Who's Online

434 user(s) are online (60 user(s) are browsing Support Forums)


Members: 0


Guests: 434


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Sep 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits