Ticket T698122
Visible to All Users

Add business objects from the non-XAF app to the TargetType List of the type permission object

created 6 years ago

[DevExpress Support Team: CLONED FROM T694717: XAF Security: Access Objects in Non-XAF Application using integrated security from XAF]
Hello again :D

So again, thanks for your time.

Now after review me and my team decided something. Reading Permissions in non-XAF works fine.
But what we don't want is to write manually to the XAF-Database in which the security settings (PermissionPolicyRole, PermissionPolicyUser, etc.) are saved.
What we want to do instead is to access the Target Type in Type Permissions in the XAF application (I attached a screenshot).
They told me that if we can trick the system to also add businessobjects from the non-XAF app to this Target Type List then everything else should work automatically because it treats the Object as the others (like Role and User for example) .
We think then it will save all settings like Role Permissions etc. for this object like it does for the Role and User Objects.
My question now is: Is it possible to add own Type properties to this in a non-XAF app and then choose those Properties in the XAF-Security application?

I've already read this: https://documentation.devexpress.com/eXpressAppFramework/113579/Concepts/Business-Model-Design/Data-Types-Supported-by-built-in-Editors/Type-Properties

But to me it seems like this is only achievable in the same application where you're gonna start the Dialog with the combo box controller.

Thanks already,
Best regards
Christian

Answers approved by DevExpress Support

created 6 years ago

Hello, Christian.

We didn't research the possibility of using types not added to the XAF type metadata and application model in our Security System. You can add your types to the static SecurityStrategy.AdditionalSecuredTypes collection to be able to use them in security rules. This seems to work at the first glance. However, we didn't test this approach and cannot guarantee that it will work in all scenarios.

    Comments (2)

      Thanks a lot. So far it seems to work.

      I'm trying to get the ".IsGranted" Property now.
      (sorry for all those questions I'm quite new to this framework)
      What I did before was using AthenticationStandard and SecurityStrategyComplex as described in How to: Use the Integrated Mode of the Security System in Non-XAF Applications to perform a logon.

      The problem now is that it doesn't seem to work in my new application. It won't accept the classes from DevExpress.ExpressApp.Security. (Screenshot attached)

      Maybe you guys have an idea what the problem could be. Thanks again and have a great weekend.

      Best regards,
      Christian

      Andrey K (DevExpress Support) 6 years ago

        Hello,

        I've created a separate ticket on your behalf (T698443: How to add a reference to a project). It has been placed in our processing queue and will be answered shortly.

        Thanks,
        Andrey

        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.