Skip to content

Commit

Permalink
Merge branch 'bug_20930/move_the_node_external_reports_plugin_entry_t…
Browse files Browse the repository at this point in the history
…o_the_node_management_menu_pr' into branches/rudder/7.1
  • Loading branch information
Jenkins CI committed Mar 24, 2022
2 parents 38113d9 + c05b6ad commit 7605978
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@

package com.normation.plugins.nodeexternalreports

import com.normation.rudder.AuthorizationType
import com.normation.plugins._
import com.normation.plugins.nodeexternalreports.service.NodeExternalReportApi
import bootstrap.liftweb.ClassPathResource
import bootstrap.liftweb.{Boot, ClassPathResource, MenuUtils}
import net.liftweb.common.Loggable
import net.liftweb.http.ClasspathTemplates
import net.liftweb.http.LiftRules
import net.liftweb.sitemap.Loc.{LocGroup, Template}
import net.liftweb.sitemap.Loc.{LocGroup, Template, TestAccess}
import net.liftweb.sitemap.LocPath.stringToLocPath
import com.normation.plugins.PluginStatus
import net.liftweb.sitemap.Menu
Expand All @@ -60,12 +61,18 @@ class NodeExternalReportsPluginDef(api: NodeExternalReportApi, override val stat
def oneTimeInit : Unit = {}

override def pluginMenuEntry: Option[Menu] = {
Some(Menu("nodeExternalReportInfo", <span>Node External Reports</span>) / "secure" / "plugins" / "nodeexternalreports" >>
Some(Menu("160-nodeExternalReportInfo", <span>Node External Reports</span>) / "secure" / "plugins" / "nodeexternalreports" >>
LocGroup("pluginsGroup") >>
Template(() =>
ClasspathTemplates( "nodeExternalReports" :: Nil ) openOr
<div>Template not found</div>)
)
}

override def pluginMenuParent: Option[Menu] = {
Some(Menu(MenuUtils.nodeManagementMenu, <span>Node management</span>) /
"secure" / "nodeManager" / "index" >> TestAccess(()
=> Boot.userIsAllowed("/secure/index", AuthorizationType.Node.Read) )
)
}
}

0 comments on commit 7605978

Please sign in to comment.