You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/03/30 18:29:46 UTC

[GitHub] [incubator-superset] axelet commented on issue #9365: fix: Row Level Security get_rls_filters func SELECT statement

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org