Current filter:
                                You should refresh the page.
                                  • I've just run into an issue with my simple app that prevents me from saving objects that inherent from other objects with the error:
                                    "You can not save the 'DevExpress.ExpressApp.DC.GeneratedClasses.IAwardData_Data_Matter(**guid**)' object due to security restrictions."
                                    (where **guid** is an actual GUID)
                                    This issue may be linked to my upgrade from vol 2.5 to vol 2.7, but I'm not positive as other changes were made. In the attached app, both "Client" and "Matter" are impacted.
                                    Steps to Reproduce:
                                    Run the attached project.
                                    Open the "Administrator" Role detail view. -> The Permissions list view does not contain types for many-to-many associations.
                                    Try to create and save a Matter object. -> A security exception is raised.
                                    Refresh the "Administrator" Role detail view. -> The Permissions list view now contains DevExpress.ExpressApp.DC.GeneratedClasses group with intermediate entities, but access to them is denied.

                                1 Solution

                                Creation Date Importance Sort by

                                I have already posted a solution for this at:
                                http://community.devexpress.com/forums/t/107287.aspx#362351

                                I have modified a little bit to take care of secured non persistent types.

                                Here is the code (same as the attached file)

                                [VB.NET]
                                Imports DevExpress.ExpressApp.Security Imports DevExpress.ExpressApp.DC Imports DevExpress.ExpressApp Namespace Security Public Class SecurityStrategyComplexEx Inherits SecurityStrategyComplex Public Sub New() End Sub Public Sub New(ByVal userType As Type, ByVal roleType As Type, ByVal authentication As AuthenticationBase) MyBase.New(userType, roleType, authentication) End Sub Public Overrides Function IsGranted(permissionRequest As IPermissionRequest) As Boolean If TypeOf permissionRequest Is AnyMemberOperationPermissionRequest Then Dim request As AnyMemberOperationPermissionRequest = CType(permissionRequest, AnyMemberOperationPermissionRequest) Dim TypeInfo As ITypeInfo = XafTypesInfo.Instance.FindTypeInfo(request.ObjectType) Dim Found As Boolean = False For Each TI As ITypeInfo In XafTypesInfo.Instance.PersistentTypes If TI.Equals(TypeInfo) Then Found = True Exit For End If Next If Not Found Then If Not SecurityStrategy.SecuredNonPersistentTypes.Contains(TypeInfo.Type) Then Return True End If End If End If Return MyBase.IsGranted(permissionRequest) End Function End Class End Namespace

                                

                                • Dennis (DevExpress) 07.24.2012

                                  Santiago,
                                  Thank you for taking your time to post this temporary solution here. We highly appreciate it.

                                • Peter Kieslinger 08.19.2014

                                  Hi Dennis,
                                  I ran into the same problem with 14.1.
                                  Only administrators can save objects which are derived from IPersistentResource.
                                  The solution above does not solve it in my case, because the IsGranted method never hits the generated types of the inherited interfaces.
                                  Regards,
                                  Peter

                                • Dennis (DevExpress) 08.20.2014

                                  @Peter: Let's continue discussing your case in the separate thread you created: T142027. I would also kindly ask you to update it with your sample project, so we can see the problem in action and debug it. If you can replicate this behavior with a DC-version of our SecurityDemo, please also provide us with it and required repro steps.