Current filter:
                                You should refresh the page.
                                  • I am trying to use SecuritySystem.IsGranted with ObjectAccessPermission, i used this code:

                                    SecuritySystem.IsGranted(new ObjectAccessPermission(typeof(CustomerRefund), ObjectAccess.Create))

                                    But it turn out it always returns true!

                                    I searched the support center and i found this ticket which state exactly my issue:

                                    The support in this ticket suggested this code to be used instead:
                                    SecuritySystem.IsGranted(new TypeOperationPermissionRequest(typeof(Role), SecurityOperations.Navigate));
                                    But i could not find TypeOperationPermissionRequest, so i searched again, and found this:

                                    And it did not help.

                                    Can you please provide me with the proper code for this.


                                1 Solution

                                Creation Date Importance Sort by

                                With the new security system, use the ClientPermissionRequest class instead of the deprecated TypeOperationPermissionRequest one. For instance, your updated code may look like this:

                                SecuritySystem.IsGranted(new ClientPermissionRequest(typeof(CustomerRefund), null, null, SecurityOperations.Create))

                                You may also find methods of the helper DevExpress.ExpressApp.DataManipulationRight class extremely helpful, as it provides methods for most common situations.