|
31 | 31 | import org.labkey.api.security.permissions.ReadPermission; |
32 | 32 | import org.labkey.api.settings.AdminConsole; |
33 | 33 | import org.labkey.api.util.PageFlowUtil; |
| 34 | +import org.labkey.api.view.DeveloperMenuNavTrees; |
| 35 | +import org.labkey.api.view.NavTree; |
| 36 | +import org.labkey.api.view.PopupDeveloperView; |
34 | 37 | import org.labkey.api.view.WebPartFactory; |
35 | 38 | import org.labkey.ldk.notification.NotificationServiceImpl; |
36 | 39 | import org.labkey.ldk.notification.SiteSummaryNotification; |
@@ -84,6 +87,17 @@ protected void init() |
84 | 87 | protected void doStartupAfterSpringConfig(ModuleContext moduleContext) |
85 | 88 | { |
86 | 89 | AdminConsole.addLink(AdminConsole.SettingsLinkType.Management, "notification service admin", DetailsURL.fromString("/ldk/notificationSiteAdmin.view").getActionURL(), AdminOperationsPermission.class); |
| 90 | + PopupDeveloperView.registerMenuProvider((c, user, trees) -> { |
| 91 | + if (c.isRoot() & user.hasSiteAdminPermission()) |
| 92 | + { |
| 93 | + trees.add(DeveloperMenuNavTrees.Section.tools, new NavTree("Notification Service Admin", DetailsURL.fromString("ldk/notificationSiteAdmin.view", c).getActionURL())); |
| 94 | + } |
| 95 | + else if (!c.isRoot() & c.hasPermission(user, AdminPermission.class)) |
| 96 | + { |
| 97 | + trees.add(DeveloperMenuNavTrees.Section.tools, new NavTree("Notification Service Admin", DetailsURL.fromString("ldk/notificationAdmin.view", c).getActionURL())); |
| 98 | + } |
| 99 | + }); |
| 100 | + |
87 | 101 | AdminConsole.addLink(AdminConsole.SettingsLinkType.Management, "file root usage summary", DetailsURL.fromString("/ldk/folderSizeSummary.view").getActionURL(), ReadPermission.class); |
88 | 102 |
|
89 | 103 | if (isSqlServer()) |
|
0 commit comments