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

Block Username Dropdown list in Timesheet

1 Answer 35 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Matteo Gugliotta
Top achievements
Rank 1
Matteo Gugliotta asked on 30 Oct 2014, 04:42 PM
Hi Team,
I want to disable the users dropdown list in Timesheet in order to forbid users
to see other peoples timesheet.

I followed an approach similar to the one suggested here: http://www.telerik.com/forums/remove-maturity-field
I found that in C:\Program Files (x86)\Telerik\TeamPulse\wwwroot\Areas\View\Views\Timesheet\Index.cshtml
the dropdown list is created by: @Html.Partial("UsersList",
Model.UsersListViewModel)

But even if I:
·        comment the line
·        restart the site
·        refresh the app pool
·        give a ctrl+F5

The list does not disappear.

What can I do to disable the selection?

Why even if I comment the row the combobox does not disappear?
 

Best regards,
Matteo

1 Answer, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 31 Oct 2014, 02:37 PM
Hello Matteo,

Currently there is no option in TeamPulse to disable this field.

Anyway you can modify a file to disable the dropdown. You will need to go and open this file - "C:\Program Files (x86)\Telerik\TeamPulse\wwwroot\Scripts\wirejs\timesheet\timesheetController.js".
The file is minified, so it may look a little bit ugly. You need to find - dataValueField:"id"  and add ",enable:false" after that, it must look like this:

//old
dataTextField:"displayName",dataValueField:"id"}
//new
dataTextField:"displayName",dataValueField:"id",enable:false}

This will disable the dropdown. Please note that the dropdown cannot be removed because the information for the current user is needed. Also this will not completely fix your problem, because any user can make an api call and will receive the timesheet information for others.

Also one more thing. All users will need to clear their browser cache, so they can download the modified "timesheetController.js".

Also take in mind that if you upgrade TeamPulse you will have to make the same changes again.

I hope that the information is useful for you. If not feel free to contact us at any time.

Regards,
Ivan
Telerik
 
Tags
General Discussions
Asked by
Matteo Gugliotta
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Share this question
or