This is a migrated thread and some comments may be shown as answers.

[Solved] how can i do User.IsInRole(Admin) in ClientTemplate?

1 Answer 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Eugene
Top achievements
Rank 1
Eugene asked on 27 Mar 2012, 07:24 AM
Hi guys,

How can i check user's role in ClientTemplate?

Is there any way for this?

1 Answer, 1 is accepted

Sort by
0
Dadv
Top achievements
Rank 1
answered on 27 Mar 2012, 08:30 AM
Hi,
Like i told you 15 days ago here, Client template is for .... client side.
You should not have any security information (role) in client side....

However if you NEED it you can transmit it via the ViewBag or the ViewData and save it in a javascript variable so you can use it in client side... but again.. this is a security behavior....
Tags
Grid
Asked by
Eugene
Top achievements
Rank 1
Answers by
Dadv
Top achievements
Rank 1
Share this question
or