Bug Report T142027
Visible to All Users

Security - ObjectLayerSecurityException when attempting to save a DC Shared Part object

created 11 years ago (modified 11 years ago)

Hi Dx Team,

In my Xaf Solution I use the SecurityComplexStrategy.
I have a DC that inherits the IPersistentResource interface.
If an non administrative user tries to save an instance of the DC it throws an access denied error on the intermediate objects of the shared part.

It seems I ran into the same issue described in Q363027 - Security.DC - Intermediate entities for many-to-many associations are not registered, and access to them is denied .

I´ve tried the solution from Q363027 without success.

As this is an extension of an solution wich is running in production, I can´t go back to the 'old' security system.

Regards,

Peter

A first chance exception of type 'DevExpress.Xpo.Exceptions.ObjectLayerSecurityException' occurred in DevExpress.Xpo.v14.1.dll
Additional information: Saving the 'DevExpress.ExpressApp.DC.GeneratedClasses.IActivityTarget_Data_BraidingMachine.IPersistentResource_Data' property is prohibited by validation rules.

DevExpress.Xpo.v14.1.dll!DevExpress.Xpo.SessionObjectLayer.ValidateObjectsOnCommit(DevExpress.Xpo.SessionObjectLayer.AsyncCommitContext context) Unknown
  DevExpress.Xpo.v14.1.dll!DevExpress.Xpo.SessionObjectLayer.BeginCommitChanges(DevExpress.Xpo.SessionObjectLayer.AsyncCommitContext context) Unknown
  DevExpress.Xpo.v14.1.dll!DevExpress.Xpo.SessionObjectLayer.CommitChanges(DevExpress.Xpo.Session session, System.Collections.ICollection fullListForDelete, System.Collections.ICollection completeListForSave) Unknown
  DevExpress.Xpo.v14.1.dll!DevExpress.Xpo.Session.FlushChangesInsideTransaction() Unknown
  DevExpress.Xpo.v14.1.dll!DevExpress.Xpo.Session.FlushChanges() Unknown
  DevExpress.Data.v14.1.dll!DevExpress.Xpo.Logger.LogManager.Log(string category, DevExpress.Xpo.Logger.LogManager.LogHandlerVoid handler, DevExpress.Xpo.Logger.LogManager.MessageHandler<DevExpress.Xpo.Logger.LogMessage> createMessageHandler, DevExpress.Xpo.Logger.LogManager.ExceptionHandler exceptionHandler) Unknown
  DevExpress.ExpressApp.Xpo.v14.1.dll!DevExpress.ExpressApp.Xpo.XPObjectSpace.DoCommit() Unknown
  DevExpress.ExpressApp.v14.1.dll!DevExpress.ExpressApp.BaseObjectSpace.CommitChanges() Unknown

Comments (3)
Anatol (DevExpress) 11 years ago

    I have tested the sample project from the Q363027 ticket with version 14.1.6 and have not reproduced the issue. Please provide a sample project where the issue can be reproduced.

    Anatol (DevExpress) 11 years ago

      Thank you for your sample. I have reproduced the exception. We are currently researching it.

      Anatol (DevExpress) 11 years ago

        It appears that there is no easy workaround. I am forwarding your ticket to our developers for further research.

        Answers approved by DevExpress Support

        created 11 years ago (modified 10 years ago)

        We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

        Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

          Show previous comments (2)

            Excellent, thanks!

            PK PK
            Peter Kieslinger 10 years ago

              I´ve tested the hotfix and it works.
              Thanks a lot!

              Dennis Garavsky (DevExpress) 10 years ago

                Thanks for your feedback!

                Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

                Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.