Opened 11 years ago

Closed 11 years ago

#1779 closed defect (fixed)

Do not show plug-in configurations if the logged in user lacks USE permission

Reported by: Nicklas Nordborg Owned by: olle
Priority: minor Milestone: BASE 3.2.4
Component: web Version:
Keywords: Cc:

Description

The current "Run plugin" dialog include plug-ins and configurations that the logged in user only have READ access to. Selecting that option and clicking "Next" result in 'Permission denied' error message.

This can probably be fixed in ContextUtil.checkContext() method if a check for USE permission is included. But first check for places that are calling this method so that excluding READ-only plug-ins doesn't create a side-effect.

Change History (7)

comment:1 by olle, 11 years ago

Owner: changed from everyone to olle

comment:2 by olle, 11 years ago

Status: newassigned

Ticket accepted.

comment:3 by olle, 11 years ago

Traceability note:

  • A unified installation procedure for plug-ins was introduced in Ticket #1592 (Unified installation procedure for plug-ins, extensions and more...).

comment:4 by olle, 11 years ago

Problem discussion:

  • JSP script index.jsp in www/common/plugin/ calls public static method List<ContextResult> checkContext(DbControl dc, ItemQuery<PluginDefinition> pluginQuery, ItemQuery<PluginConfiguration> configQuery, GuiContext context, Object currentItem) in class/file ContextUtil.java in src/core/net/sf/basedb/util/ to get a list of ContextResult items to display in the plug-in menu.

Proposed fix:

  • Class/file ContextUtil.java in src/core/net/sf/basedb/util/ is updated in public static method List<ContextResult> checkContext(DbControl dc, ItemQuery<PluginDefinition> pluginQuery, ItemQuery<PluginConfiguration> configQuery, GuiContext context, Object currentItem) to check if a plug-in and optional configuration have USE permission for the logged-in user.
Version 0, edited 11 years ago by olle (next)

comment:5 by olle, 11 years ago

(In [6343]) Refs #1779. Plug-in configurations are now not shown if the logged-in user lacks USE permission:

  1. Class/file ContextUtil.java in src/core/net/sf/basedb/util/ is updated in public static method List<ContextResult> checkContext(DbControl dc, ItemQuery<PluginDefinition> pluginQuery, ItemQuery<PluginConfiguration> configQuery, GuiContext context, Object currentItem) to check if a plug-in and optional configuration have USE permission for the logged-in user.

comment:6 by olle, 11 years ago

(In [6344]) Refs #1780. Refs #1779. The option to copy a transformation is now disabled, if insufficient permissions exist to perform it:

  1. JSP script www/views/experiments/bioassaysets/analysis_tree.jsp is updated to only add a 'copy' link, if the user has permission to use the plug-in and its configuration. The user might not have READ permission for a plug-in, which is considered when trying to obtain the plug-in configuration. A better solution than omitting the 'copy' link, would have been to display an icon for a disabled action, but this is left for a future update.
  2. JSP script www/views/experiments/transformations/view_transformation.jsp is updated to check if the user has permission to use the plug-in and its configuration, and disable the 'copy' button in the properties tool bar for the transformation, if the permissions are insufficient.

comment:7 by olle, 11 years ago

Resolution: fixed
Status: assignedclosed

Ticket closed as the requested functionality has been added.

Note: See TracTickets for help on using tickets.