1
Answer

how to give access to button based on certain roles

shosho shosho

shosho shosho

9y
484
1
I have a page which has a button that i want only managers to see.
Each user  has a role (can be two or more roles).
I have a list that gets all the current logged in user roles.
 
How can i give a condition that if this current logged user does not have a  manager role Id then the button should not be displayed. 
(each manager of different department has a different role id).
I know this can be done by hardcoding but is there another way to do this? These role values are read from the db.
 
thanks in advance 
 
 
Answers (1)
2
Thiyagarajan E

Thiyagarajan E

NA 1.1k 6.8k 8y
I found the Solution:
Finf the Report web config in the below path :
C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportManager\web .config
Replace or add below line: to set admin credential for all users to access the report.

<authentication mode="Windows" /> // Authentication mode to be set to windows

<identity impersonate="true " userName="UserName" password="Password"/> // identity impersonate to be set to true and User name & Password of the SQL Server administrator should be added.