public class JiraGadgetPermissionManager extends Object implements GadgetPermissionManager
Constructor and Description |
---|
JiraGadgetPermissionManager(PermissionManager permissionManager,
com.atlassian.plugin.PluginAccessor pluginAccessor,
com.atlassian.gadgets.dashboard.spi.DashboardPermissionService permissionService,
com.atlassian.event.api.EventPublisher eventPublisher) |
Modifier and Type | Method and Description |
---|---|
com.atlassian.gadgets.dashboard.DashboardState |
filterGadgets(com.atlassian.gadgets.dashboard.DashboardState dashboardState,
ApplicationUser remoteUser)
Removes any gadgets a user doesn't have permission to see in the passed in dashboard state.
|
io.atlassian.fugue.Option<com.atlassian.gadgets.plugins.PluginGadgetSpec> |
getPluginGadgetSpec(URI gadgetUri)
Retrieve the equivalent of
PluginGadgetSpec object from gadgetUri . |
com.atlassian.gadgets.Vote |
voteOn(com.atlassian.gadgets.plugins.PluginGadgetSpec pluginGadgetSpec,
ApplicationUser remoteUser)
Decides if a user has permission to view a particular gadget.
|
public JiraGadgetPermissionManager(PermissionManager permissionManager, com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.gadgets.dashboard.spi.DashboardPermissionService permissionService, com.atlassian.event.api.EventPublisher eventPublisher)
public com.atlassian.gadgets.Vote voteOn(com.atlassian.gadgets.plugins.PluginGadgetSpec pluginGadgetSpec, ApplicationUser remoteUser)
GadgetPermissionManager
voteOn
in interface GadgetPermissionManager
pluginGadgetSpec
- The gadget spec to check permissions forremoteUser
- The user viewing the dashboard. May be null for anonymous userspublic com.atlassian.gadgets.dashboard.DashboardState filterGadgets(com.atlassian.gadgets.dashboard.DashboardState dashboardState, ApplicationUser remoteUser)
GadgetPermissionManager
filterGadgets
in interface GadgetPermissionManager
dashboardState
- The dashboard state to filterremoteUser
- The user viewing the dashboard. May be null for anonymous userspublic io.atlassian.fugue.Option<com.atlassian.gadgets.plugins.PluginGadgetSpec> getPluginGadgetSpec(URI gadgetUri)
GadgetPermissionManager
PluginGadgetSpec
object from gadgetUri
.getPluginGadgetSpec
in interface GadgetPermissionManager
gadgetUri
- The url to be used to retrieve the PluginGadgetSpec
object.PluginGadgetSpec
if it exists, otherwise nothing.Copyright © 2002-2021 Atlassian. All Rights Reserved.