Hi Mahi,
Please check the *'security.ldap.fail.login=false'* property in the
security.properties file. I believe your LDAP is not working, and the
shipping and admin users are logging in using the OFBiz login workflow. You
can add debug logs in the *LdapAuthenticationServices.java* file to
investigate the issue further.

On Fri, May 5, 2023 at 4:02 PM Mahi maheshwari <[email protected]>
wrote:

> Hello Community,
>
> I was trying with multiple logins with different users in multitenant and
> I'm facing one issue i.e. when logging in with any user with LDAP Enabled (
> security.ldap.enable=true),
> the login was working only for the shipping user and admin user, for the
> remaining users it's not working. I have tried the below code.
> if I disable the LDAP (security.ldap.enable=false), it works for all users.
>
> *below code for reference:*
>
> if(security.hasEntityPermission("XCOMPANY", "_ADMIN", session)){
>     //println "security value for
> ADMIN============="+security.hasEntityPermission("XCOMPANY", "_ADMIN",
> session)
>     context.detailScreen = 'XCOMPANYAdminView'
> }else if (security.hasEntityPermission("XCOMPANY_PRODUCTION", "_CREATE",
> session)) {
> //println "security value for
>
> XCOMPANY_PRODUCTION============="+security.hasEntityPermission("XCOMPANY_PRODUCTION",
> "_VIEW", session)
>      Submitform.productionNeedsPage(request,response);
>      context.detailScreen = 'ProductionViewFtl'
>
> }else if(security.hasEntityPermission("XCOMPANY_PRODCUTORDER", "_CREATE",
> session)){
>     println "security value for
>
> XCOMPANY_PRODCUTORDER============="+security.hasEntityPermission("XCOMPANY_PRODCUTORDER",
> "_CREATE", session)
>     OrdersRelatedService.RawMaterialShortageOrder(request,response);
>     Submitform.ordersDelayedOrdersEvent(request,response);
>     context.detailScreen = 'NewPurchaseOrderFtl'
>
> }else if(security.hasEntityPermission("XCOMPANY_MAINWAREHOUSEMGMT",
> "_CREATE", session)){
>     println "security value for
>
> XCOMPANY_MAINWAREHOUSEMGMT============="+security.hasEntityPermission("XCOMPANY_MAINWAREHOUSEMGMT",
> "_CREATE", session)
>     Submitform.ShippingTobeSchedule_Event(request, response);
>     Submitform.EnvironmentalWarningEvent(request, response);
>     WarehouseSubmit.WarehouseAgedInventory(request, response);
>
>     context.detailScreen = 'WarehouseMainPageFtl'
>
> }else if(security.hasEntityPermission("XCOMPANY_PRODUCTCATALOG", "_CREATE",
> session)){
>     println "security value for
>
> XCOMPANY_PRODUCTION============="+security.hasEntityPermission("XCOMPANY_PRODUCTCATALOG",
> "_CREATE", session)
>     context.detailScreen = 'ProductCatalogDetailsFtl'
>
> }else if(security.hasEntityPermission("XCOMPANY_ASSETMAINTENANCE",
> "_CREATE", session)){
>     println "security value for
>
> XCOMPANY__ASSETMAINTENANCE============="+security.hasEntityPermission("XCOMPANY_ASSETMAINTENANCE",
> "_CREATE", session)
>      Submitform.listAssest_withcurrentdate_Event(request,response);
>     context.detailScreen = 'ListOfAssetsFtl'
>
> }else if(security.hasEntityPermission("XCOMPANY_QUALITY", "_CREATE",
> session)){
>     println "security value for
>
> XCOMPANY_QUALITY============="+security.hasEntityPermission("XCOMPANY_QUALITY",
> "_CREATE", session)
>     Submitform.qualityDegradedEvent(request, response);
>     context.detailScreen = 'QualityMainPageFtl'
>
> }else if(security.hasEntityPermission("XCOMPANY_SHIPPING", "_CREATE",
> session)){
>     println "security value for
>
> XCOMPANY_SHIPPING============="+security.hasEntityPermission("XCOMPANY_SHIPPING",
> "_CREATE", session)
>     Submitform.ShippingTobeSchedule_Event(request, response);
>     context.detailScreen = 'ShippingSummaryFtl'
>
> }
>
> please help me with this to make it work after enabling the LDAP in
> multitenant.
>
> Regards,
> Maheshwari.
>


-- 
Kind Regards,
Yashwant Dhakad
Sr. Technical Consultant

*HotWax Systems*
*Enterprise open source experts*
cell: +91-9098240513
office: 0731-409-3684
http://www.hotwaxsystems.com

Reply via email to