Ticket Q449037
Visible to All Users
Duplicate

New security system - Deny Write permission visually but not by code

created 12 years ago

Hi,

In the old security system I denied write permission for certain objects in a role, because I don't' want certain users to modify the object from the UI, but by code I could change a property.

For example I have the Stock object, I want that the user can read the values, but cannot modifiy any of the values.
But by code, when the user saves an Invoice, I need that by code the stock changes are saved.
With the new security system, I get an error when the user saves the invoice, because the user has no write permission to stock Object.

Thanks
Analia

Answers approved by DevExpress Support

created 12 years ago (modified 12 years ago)

Hello Analia,
Please pardon my delayed response. These days we've been a little bit overloaded with support queries.
You should not get any errors in this particular scenario if you used the UI-level security mode. These errors should normally occur only in the integrate mode and the scenario when the application server is used. You can learn more on this from this help article. Please feel free to contact us if you require any further assistance with the migration to the new security system.

    Comments (2)
    A A
    Analia Veronica Urbano Gonzalez 12 years ago

      The problem was that I had the ObjectSpaceProvider of the wrong type created.
      wrong code:
      protected override void CreateDefaultObjectSpaceProvider(CreateCustomObjectSpaceProviderEventArgs args)
              {
                  args.ObjectSpaceProvider = new SecuredObjectSpaceProvider( (SecurityStrategy)Security, args.ConnectionString, args.Connection);
              }
      right code:
         protected override void CreateDefaultObjectSpaceProvider(CreateCustomObjectSpaceProviderEventArgs args)
              {
                  args.ObjectSpaceProvider = new XPObjectSpaceProvider(args.ConnectionString, args.Connection);

      }

      Dennis Garavsky (DevExpress) 12 years ago

        Yes, SecuredObjectSpaceProvider is a part of the integration security mode.

        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.