Skip to content
This repository has been archived by the owner on Feb 4, 2025. It is now read-only.

Commit

Permalink
Adding the readonly property for TRACS to control tool level permissi…
Browse files Browse the repository at this point in the history
…ons setting availability; cleaner approach for TRACS readonly config
  • Loading branch information
yq12 committed Oct 30, 2020
1 parent a6aab80 commit 2362724
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ public void includePage(PortalRenderContext rcontext, HttpServletResponse res,
String toolContextPath, String wrapperClass) throws IOException
{
int toolCount = 0;
boolean TRACS_READONLY = ServerConfigurationService.getBoolean("tracs.readonly", false);

if ( page == null ) return;
if (rcontext.uses(INCLUDE_PAGE))
Expand Down Expand Up @@ -349,6 +350,7 @@ public void includePage(PortalRenderContext rcontext, HttpServletResponse res,
rcontext.put("bottomNavServiceVersion", serviceVersion);
rcontext.put("bottomNavSakaiVersion", sakaiVersion);
rcontext.put("bottomNavServer", server);
rcontext.put("tracsReadOnly", TRACS_READONLY);
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,16 @@
</script>
<script src="/library/js/moment/2.17.1/moment.min.js"></script>
<script src="/library/js/headscripts.js"></script>
<script src="/library/js/removePermissions.js"></script>
<script>
includeLatestJQuery("portal- sessionhistory")
</script>
<script src="/library/sessionhistory/js/sessionhistory.js"></script>
<link type="text/css" rel="stylesheet" href="/library/sessionhistory/css/sessionhistory.css">


#if($tracsReadOnly)
<script src="/library/js/removePermissions.js"></script>
#end

<!-- inlined tool header contribution -->
## if any of the tools requested an inline render, their header content gets aggregated here
#foreach ( $tool in $pageColumn0Tools )
Expand Down
2 changes: 1 addition & 1 deletion tracs-docker
Submodule tracs-docker updated from 8be995 to e9f3af

0 comments on commit 2362724

Please sign in to comment.