Roles and permissions tests using filters

This PR includes:
- some commits from @Ichimonji10
which are already merged in master so I didn't squashed all commits.
- Few tests related to roles permissions and filters