This repository was archived by the owner on Jan 8, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 11@(widgetType: String, params: Array[String])
22
3+ @import lib.security.RestPermissions
4+ @import views.helpers.Permissions.isPermitted
5+
36< div class ="btn-group ">
47 < a data-toggle ="dropdown " href ="# " class ="add-to-dashboard " data-widget-type ="@widgetType ">
58 < i class ="icon icon-dashboard " title ="Add to dashboard "> </ i >
1518 }
1619 >
1720 < li >
18- < a href ="@routes.DashboardsController.newDashboard() "> No dashboards. Create one?</ a >
21+ @if(isPermitted(RestPermissions.DASHBOARDS_CREATE)) {
22+ < a href ="@routes.DashboardsController.newDashboard() "> No dashboards. Create one?</ a >
23+ } else {
24+ < a > < i > No dashboards exist and you are not allowed to create one.</ i > </ a >
25+ }
1926 </ li >
2027 </ ul >
2128</ div >
Original file line number Diff line number Diff line change 44@import lib.security.RestPermissions
55@import views.helpers.DateHistogramResolutionSelector
66@import views.helpers.Permissions
7+ @import views.helpers.Permissions.isPermitted
78@import lib.DateTools
89@import controllers.routes;
910
@@ -279,7 +280,11 @@ <h3>
279280 data-widget-type ="field_chart "
280281 >
281282 < li >
282- < a href ="@routes.DashboardsController.newDashboard() "> No dashboards. Create one?</ a >
283+ @if(isPermitted(RestPermissions.DASHBOARDS_CREATE)) {
284+ < a href ="@routes.DashboardsController.newDashboard() "> No dashboards. Create one?</ a >
285+ } else {
286+ < a > < i > No dashboards exist and you are not allowed to create one.</ i > </ a >
287+ }
283288 </ li >
284289 </ ul >
285290 </ li >
You can’t perform that action at this time.
0 commit comments