Home > Forum > Database > How to check users in actions using queries

How to check users in actions using queries
0

Hello all,

Hope you're doing great!

Does anyone know how to configure a query which will return where a specific user was set in any action?

I'm using this article https://community.webcon.com/posts/post/checking-user-and-group-privileges/258/3 but I want to also check where for example the user is hard coded for the Task Assignment for example.

Hope you got ideas!

Thank you

MVP

Hi Andrea,

this well get a little difficult, especially when you have nested business rules. I don't have a direct solution for you but I can provide you with a starting point.

I've a few procedures which search the whole database. You can find a screenshot of the result here and a description of the procedures here:
https://daniels-notes.de/posts/2021/deploying-database-scripts#searching-tables

These scripts are part of the following excel file. You can simply copy the cell and execute it in SQL Management Studio
https://github.com/Daniel-Krueger/webcon_artifactDeployment/blob/main/2021.1.3.205/Database%20scripts.xlsx


If you don't need this query often, you probably don't need to create a query but could use the procedure.


I've one recommendation though it's a little late. Instead of hard coding user accounts use constants which contain the user name or BPS group. This will make your life a lot easier. You have one place to change and can see where it's used from the usage tab. Ok you can't use this in all provided functions but these can be replaced by your own ones.

Best regards,
Daniel