Current filter:
                                You should refresh the page.
                                  • [DevExpress Support Team: CLONED FROM Q491624: How to use SecuritySystem.IsGranted with ObjectAccessPermission]

                                    I need to implement this in a class (xpo class) but the ClientPermissionRequest is now obsolete. In a class I don't have the ObjectSpace, only the Session object available. What's the alternative for this?
                                    I need to know is the user has permission for showing/hide some tabs in the detail view. I trying to do this with an Appearance rule

                                1 Solution

                                Creation Date Importance Sort by

                                Hello,

                                You can get an object space from within a business class using the IObjectSpaceLink interface. In certain scenarios you can also use XPObjectSpace > FindObjectSpaceByObject, but it is not generally recommended.

                                To check permission requests, consider one of the two approaches:

                                1. How to: Hide the 'Protected Content' Columns in a List View and Property Editors in a Detail View
                                [C#]
                                if(!DataManipulationRight.CanRead(View.ObjectTypeInfo.Type, ((ColumnWrapper)e.Item).PropertyName, null, ((ListView)View).CollectionSource, View.ObjectSpace)) { e.AppearanceObject.Visibility = ViewItemVisibility.Hide; }
                                2. Access the Security System in Code
                                [C#]
                                bool isStatusGranted = SecuritySystem.IsGranted(new PermissionRequest(ObjectSpace, typeof(DemoTask), SecurityOperations.Write, selectedObject, "Status"));