FLEXIcontent / flexicontent-cck

Advanced content management for Joomla
http://www.flexicontent.org
82 stars 53 forks source link

Update Module to Super User breaks Update in backend #1168

Closed iamrobert closed 6 months ago

iamrobert commented 6 months ago

Hi @ggppdk

As a Super User I can no longer edit FLEXIContent Universal modules with this update:

Super admins only

I keep getting the error message when I click Update: You can not edit this in frontend. Please login as a super admin

Video of Issue

Screenshots:

iamrobert commented 6 months ago

Sorry! Your code works - have old code for some reason.

micker commented 6 months ago

Hello dis you test master branch ? That correctedLe 24 déc. 2023 17:34, Robert Stark @.***> a écrit : Hi @ggppdk As a Super User I can no longer edit FLEXIContent Universal modules with this update: Super admins only I keep getting the error message when I click Update: You can not edit this in frontend. Please login as a super admin Video of Issue Screenshots:

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

iamrobert commented 6 months ago

hi @micker

For clarification, this version works:

if ( (!$hasTemplates || !Factory::getUser()->authorise('core.admin')) && (isset($_POST['jform']['params']['php_rule']) || isset($_REQUEST['jform']['params']['php_rule']) ))

ggppdk commented 6 months ago

Your report revealed another (different) issue that existed:

Fixed it here and added backend message too https://github.com/FLEXIcontent/flexicontent-cck/commit/f6ac5227d28bd2608bfc7d8402ef1bd12de74386