-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74583/#review225724
-----------------------------------------------------------




agents-common/src/main/java/org/apache/ranger/plugin/errors/ValidationErrorCode.java
Lines 159 (patched)
<https://reviews.apache.org/r/74583/#comment314167>

    Consider replacing #159 with the following:
      GDS_VALIDATION_ERR_RESOURCE_ALREADY_IN_DATASHARE, 4127, "Resource {1} is 
already in datashare {2}"
    
    Also, please ove #159 after #164 to keep the error codes in order.



security-admin/src/main/java/org/apache/ranger/validation/RangerGdsValidator.java
Lines 277 (patched)
<https://reviews.apache.org/r/74583/#comment314168>

    I suggest to setup unique key constraint at the database schema and avoid 
validation in #277 - #282.


- Madhan Neethiraj


On Sept. 6, 2023, 10:06 a.m., Prashant Satam wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74583/
> -----------------------------------------------------------
> 
> (Updated Sept. 6, 2023, 10:06 a.m.)
> 
> 
> Review request for ranger, Anand Nadar, Madhan Neethiraj, and Subhrat 
> Chaudhary.
> 
> 
> Bugs: RANGER-4395
>     https://issues.apache.org/jira/browse/RANGER-4395
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Currently we are not validating SharedResource Objects resources field if 
> they are already present in the database ,we need to add that validation
> 
> 
> Diffs
> -----
> 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/errors/ValidationErrorCode.java
>  f32c8b3fc 
>   
> security-admin/src/main/java/org/apache/ranger/validation/RangerGdsValidationDBProvider.java
>  cd8fcc696 
>   
> security-admin/src/main/java/org/apache/ranger/validation/RangerGdsValidationDataProvider.java
>  ab74e90e4 
>   
> security-admin/src/main/java/org/apache/ranger/validation/RangerGdsValidator.java
>  374ac046d 
> 
> 
> Diff: https://reviews.apache.org/r/74583/diff/1/
> 
> 
> Testing
> -------
> 
> 1)Add SharedResource with duplicated resources will get validation Error
> 
> 
> Thanks,
> 
> Prashant Satam
> 
>

Reply via email to