You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2026/09/19 13:16:00 UTC

[jira] [Commented] (OFBIZ-13602) visualThemePermissionCheck() checks a permission ID that doesn't exist, locking

    [ https://issues.apache.org/jira/browse/OFBIZ-13602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18117051#comment-18117051 ] 

ASF subversion and git services commented on OFBIZ-13602:
---------------------------------------------------------

Commit 8a1c007062556256988582e2fb16a98abe64549f in ofbiz-framework's branch refs/heads/trunk from Mridul Pathak
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=8a1c007062 ]

Fixed: visualThemePermissionCheck() checks a permission ID that doesn't exist (OFBIZ-13602)

visualThemePermissionCheck() set primaryPermission to 'VISUAL_THEME', but the
actual seeded SecurityPermission records are VISUALTHEME_CREATE/_UPDATE/
_DELETE/_ADMIN, with no underscore between "VISUAL" and "THEME". The typo'd
permission id never matched a granted permission for any user, silently
locking out every Visual Theme create/update/delete admin action for
everyone, including SUPER/FULLADMIN. Corrected the literal back to
'VISUALTHEME'.

Verified with a temporary RED/GREEN test; full common component suite passes.


> visualThemePermissionCheck() checks a permission ID that doesn't exist, locking 
> --------------------------------------------------------------------------------
>
>                 Key: OFBIZ-13602
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13602
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework/common
>    Affects Versions: Upcoming Branch, 24.09.07
>            Reporter: Mridul Pathak
>            Assignee: Mridul Pathak
>            Priority: Major
>
> h3. Needs fixing
> {{framework/common/src/main/groovy/org/apache/ofbiz/common/permission/CommonPermissionServices.groovy}}'s {{visualThemePermissionCheck()}} sets {{parameters.primaryPermission = 'VISUAL_THEME'}}, where the pre-conversion minilang set it to {{'VISUALTHEME'}} (no underscore). The actual seeded {{SecurityPermission}} records in {{CommonSecurityPermissionSeedData.xml}} are {{VISUALTHEME_CREATE}}, {{VISUALTHEME_UPDATE}}, {{VISUALTHEME_DELETE}} and {{VISUALTHEME_ADMIN}} — no underscore between "VISUAL" and "THEME". Because {{genericBasePermissionCheck()}} builds the permission it checks for as {{"${primaryPermission}_${mainAction}"}}, the typo'd value produces {{VISUAL_THEME_CREATE}} etc., which matches no granted permission for any user or security group, including {{SUPER}}/{{FULLADMIN}}. This silently locks out every one of the six {{<permission-service service-name="visualThemePermissionCheck">}} gates declared in {{services.xml}} (Visual Theme and Visual Theme Resource create/update/delete) for everyone. Needs fixing: change the literal back to {{'VISUALTHEME'}}.
> Acceptance criteria: {{visualThemePermissionCheck}} correctly grants Visual Theme create/update/delete to a user holding the corresponding {{VISUALTHEME_*}} permission, with a regression test covering at least one grant and one deny case.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)