ValidationHelper:CanFind checks at least one time for request authorization when inside a service call?
 
Forums / SmartComponent Library - Developer Forum / ValidationHelper:CanFind checks at least one time for request authorization when inside a service call?

ValidationHelper:CanFind checks at least one time for request authorization when inside a service call?

3 posts, 1 answered
  1. Patrik Wikström
    Patrik Wikström avatar
    81 posts
    Registered:
    15 Oct 2018
    27 Aug
    Link to this post
    We have the need to prevent read on one of our BE's but would need to be able to call ValidationHelper:CanFind on the BE when inside another service call.

    Is it true that we can't fully control the request authorization in the BE code when using ValidationHelper:CanFind? We thought we could temporary have the ServiceInterface:PerformNestedRequestAuthorization to be FALSE but then there's the lAuthorizationChecked property that forces at least one extra check? We haven’t tested this yet and are basing this on our understanding of the code.
    Last modified on 27 Aug 2025 07:08 by Patrik Wikström
  2. Mike Fechner
    Mike Fechner avatar
    354 posts
    Registered:
    14 Sep 2016
    Answered
    27 Aug in reply to Patrik Wikström
    Link to this post
    Hi Patrick,

    I think there are a few things you can do:

    - implement a custom IRequestAuthorizationProvider service that does not require authorization on he can-find call
    - Implement a custom ValidateClass that calls CanFind on the business entity reference using the ServiceManager instead of through the ServiceInterface. It is our understanding that the methods in the Validate class are a sample for customer specific validation routines.
    - Log a support ticket and request an enhancement
  3. Patrik Wikström
    Patrik Wikström avatar
    81 posts
    Registered:
    15 Oct 2018
    28 Aug in reply to Mike Fechner
    Link to this post
    Hi!

    We have an own IRequestAuthorizationProvider service and will probably change it to not require authorization on the CanFind call.
3 posts, 1 answered