Skip to content
Permalink
Browse files Browse the repository at this point in the history
fix: corrected wrong check on user permission
  • Loading branch information
thorsten committed Feb 16, 2023
1 parent 3686e72 commit 400d9cd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions phpmyfaq/admin/record.add.php
Expand Up @@ -8,12 +8,12 @@
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/.
*
* @package phpMyFAQ
* @author Thorsten Rinne <thorsten@phpmyfaq.de>
* @package phpMyFAQ
* @author Thorsten Rinne <thorsten@phpmyfaq.de>
* @copyright 2003-2022 phpMyFAQ Team
* @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
* @link https://www.phpmyfaq.de
* @since 2003-02-23
* @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
* @link https://www.phpmyfaq.de
* @since 2003-02-23
*/

use Abraham\TwitterOAuth\TwitterOAuth;
Expand Down Expand Up @@ -41,7 +41,7 @@
exit();
}

if ($user->perm->hasPermission($user->getUserId(), 'edit_faq') || $user->perm->hasPermission($user->getUserId(), 'add_faq')) {
if ($user->perm->hasPermission($user->getUserId(), 'add_faq')) {
// FAQ data
$dateStart = Filter::filterInput(INPUT_POST, 'dateStart', FILTER_UNSAFE_RAW);
$dateEnd = Filter::filterInput(INPUT_POST, 'dateEnd', FILTER_UNSAFE_RAW);
Expand Down

0 comments on commit 400d9cd

Please sign in to comment.