Frontend: Permission to edit FAQ entry

Please report bugs here!

Moderator: Thorsten

Post Reply
pca
Posts: 4
Joined: Thu Jan 05, 2012 11:11 am

Frontend: Permission to edit FAQ entry

Post by pca »

Password secured fontend (2.7.1): Despite of the fact that the user has no rights to edit a FAQ entry there is a link to edit the entry in the frontend (tab 'About this FAQ).

Solution: In article.php, line 194, change

Code: Select all

if (isset($permission['editbt'])) {
to

Code: Select all

if (isset($permission['editbt']) && $permission['editbt']) {
Change request: It would ne nice if the access to the tab 'Add translation' could be restricted in the same way.
That is easy to realize (PMF 2.7.1):

Delete line 277, article.php

Code: Select all

'msgTranslate'                  => $PMF_LANG['msgTranslate'],
Add to article.php line, line 259

Code: Select all

if (isset($permission['addtranslation']) && $permission['addtranslation']) {
    $tpl->processBlock(
        'writeContent',
        'addTranslation',
        array(
           'msgTranslate' => $PMF_LANG['msgTranslate'],
        )
    );
}
Change article.tpl:
Insert [addTranslation] before the li-tag with {msgTranslate} inside and
insert [/addTranslation] after the li-tag with {msgTranslate} inside.

Best regards
Peter
Thorsten
Posts: 15565
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Frontend: Permission to edit FAQ entry

Post by Thorsten »

Hi,

you're right, thanks! Already added to the git repo, will be released with the upcoming 2.7.3 release!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply