axelet commented on issue #9365: fix: Row Level Security get_rls_filters func 
SELECT statement
URL: 
https://github.com/apache/incubator-superset/pull/9365#issuecomment-606166493
 
 
   @altef @villebro So, I see we already have the **RowLevelSecurityTests** 
case and the **test_rls_filter_alters_query** test should catch the scenario 
with wrong **id** used imo. Or should we consider adding a new test? 
   
   We can make the case more general. I've altered a bit the test case in the 
**setUp** function, so it now adds 1 filter for 2 roles (2 role_filter 
relations in the **rls_filter_roles** table). And I also changed the 
**test_rls_filter_alters_query** test, so the user is now 'alpha' (role_id = 
3), not 'gamma' (role_id = 4). This way the relation_id will not accidentally 
match the rls_filter_id.
   The **rls_filter_roles** table at this point looksq like:
   ```
   id | role_id | rls_filter_id
    1 |       4 |             1
    2 |       3 |             1
   ```
   
   PS. I also changed the clause to "gender = 'boy'" for consistency with the 
birth_names table (it only has 'boy' and 'girl' values in this column). It's 
not necessary, but to avoid confusion it will be useful I guess.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to