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

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

Commit 81bac9ab31c66ef6052a8cb784fd0e9971d5e41e in ofbiz-framework's branch 
refs/heads/trunk from Daniel Watford
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=81bac9ab31 ]

Fixed: ModelPermission handles errors from permission-services (OFBIZ-12741)

Responses from permission services are checked for errors. Errors are
returned to the caller.

> ModelPermission should handle error responses from permission-services
> ----------------------------------------------------------------------
>
>                 Key: OFBIZ-12741
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-12741
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework/service
>    Affects Versions: 22.01.01
>            Reporter: Daniel Watford
>            Assignee: Daniel Watford
>            Priority: Major
>
> ModelPermission's evalPermissionService method will call a permission-service 
> as part of checking whether a user is permitted to execute a service.
> If the permission service returns an error response then a Null Pointer 
> Exception will be thrown by evalPermissionService since the error response is 
> not trapped.
> Amend evalPermissionService to detect an error response from the permission 
> service and return it unchanged to the caller.
> Further, amend evalPermissionService to check for the presence of the 
> hasPermission attribute in the response before attempting to retrieve and 
> convert it to a boolean.



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

Reply via email to