Solved

User roles

  • 12 July 2022
  • 8 replies
  • 132 views

Userlevel 1
Badge +1

 

I need to filter the data based on the user role .An employee has more items ,but each employee has his own set of items .For example if the user is logged as an employee ,I would like to see the specific items for this employee . 

How I should approach this problem?

icon

Best answer by Renée Evertzen 13 July 2022, 10:26

View original

This topic has been closed for comments

8 replies

Userlevel 4
Badge +3

Hello Sulea,

It should be possible to set up a prefilter that limits the set of items to a specific set, depending on the conditions that you want to apply. If you want to ensure that this prefilter is always switched on for a specific role you can use the Data authorization prefilter option in the Roles menu.

It depends a bit on what you actually want to achieve and in which way your datamodel has been set up that determines how you should shape your prefilter.

Hopefully this answers your question. If it doesn't, just inquire further 😄

Userlevel 1
Badge +1

Hello Renee,

How can I make an association between the user and a column from a table?

 

Userlevel 4
Badge +3

Well that depends on what you want to achieve and how you want to achieve it.

If you want to directly assign specific items or item categories to an employee within your application, you would have to create a link table such as employee_item where you can connect those two to each other. In this situation you can specify that employee A can see items of category A/B/C, but employee B can see items of category C/D/E. After that you can set up your prefilter to respond in such a way that only the items that exist in employee_item, based on the user that is currently logged in, to be shown.

If you want to limit the items per role, for example in such a way that senior employees can see more items than junior employees, you could set up two prefilters that limit the list of items, and assign those prefilters to the appropriate roles. These roles would be assigned to user groups, the user groups to the user, thus limiting the data that one can see.

Hopefully this clarifies things a bit more 😄

 

Userlevel 6
Badge +4

Hello Sulea,

To add to Renée's answer, you can use the tsf_user() function to retrieve the name of the user that is currently logged in.

SELECT dbo.tsf_user()

This function can be used in prefilters and view definitions to filter the data set.

Userlevel 1
Badge +1

How can I add active employees as user to the application ? 

Userlevel 1
Badge +1

How can use the roles created ?How can I access them in IAM? How can I logged in IAM with the roles created in the SF?

Userlevel 7
Badge +23

Hi Sulea,

Have you found the answers already or do you need some additional help? 

Userlevel 1
Badge +1

Hi Mark ,

Yes I have found the answers already .Thank you for your concerc :)