Skip to content

Commit

Permalink
Migrate User.isInSiteAdminGroup() -> User.hasSiteAdminPermission() (#380
Browse files Browse the repository at this point in the history
)
  • Loading branch information
labkey-adam authored Oct 7, 2023
1 parent ff9f0c3 commit 8975ce0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lincs/src/org/labkey/lincs/LincsController.java
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@ public ModelAndView getView(LincsPspJobForm form, BindException errors)
statusButton.setActionType(ActionButton.Action.GET);
buttonBar.add(statusButton);

if (getUser().isInSiteAdminGroup())
if (getUser().hasSiteAdminPermission())
{
ActionURL updateStatusUrl = new ActionURL(UpdatePspJobStatusAction.class, getViewContext().getContainer());
ActionButton updateButton = new ActionButton(updateStatusUrl, "Update Status");
Expand All @@ -1231,7 +1231,7 @@ public ModelAndView getView(LincsPspJobForm form, BindException errors)
DetailsView detailsView = new DetailsView(dr, pspJob.getId());
view.addView(detailsView);

if(pspJob.getPipelineJobId() != null && getUser().isInSiteAdminGroup())
if(pspJob.getPipelineJobId() != null && getUser().hasSiteAdminPermission())
{
ActionURL pipelineJobUrl = PageFlowUtil.urlProvider(PipelineStatusUrls.class).urlDetails(getContainer(), pspJob.getPipelineJobId());
view.addView(new HtmlView(PageFlowUtil.link("View Pipeline Job. Status: " + PipelineService.get().getStatusFile(pspJob.getPipelineJobId()).getStatus()).href(pipelineJobUrl).toString()));
Expand Down
2 changes: 1 addition & 1 deletion lincs/src/org/labkey/lincs/LincsDataTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public void renderGridCellContents(RenderContext ctx, Writer out) throws IOExcep
if(pspJob == null)
{
out.write("PSP job not found for runId: " + runId);
if(userSchema.getUser().isInSiteAdminGroup())
if(userSchema.getUser().hasSiteAdminPermission())
{
ActionURL url = new ActionURL(LincsController.SubmitPspJobAction.class, getContainer());
url.addParameter("runId", runId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public DisplayColumn createRenderer(ColumnInfo colInfo)
@Override
public Object getValue(RenderContext ctx)
{
if (ctx.getViewContext().getUser().isInSiteAdminGroup())
if (ctx.getViewContext().getUser().hasSiteAdminPermission())
{
// Show the password only to site admins
return super.getValue(ctx);
Expand Down

0 comments on commit 8975ce0

Please sign in to comment.