com.atlassian.gadgets.dashboard.spi
Interface DashboardPermissionService


public interface DashboardPermissionService

Provide a way to determine if a user has permission to perform the given operations on a dashboard.

Since:
2.0

Method Summary
 boolean isReadableBy(com.atlassian.gadgets.dashboard.DashboardId dashboardId, String username)
          Returns true if the user identified by username has permission to view the dashboard identified by the DashboardId, false otherwise.
 boolean isWritableBy(com.atlassian.gadgets.dashboard.DashboardId dashboardId, String username)
          Returns true if the user identified by username has permission to modify the dashboard identified by the DashboardId, false otherwise.
 

Method Detail

isReadableBy

boolean isReadableBy(com.atlassian.gadgets.dashboard.DashboardId dashboardId,
                     @Nullable
                     String username)
Returns true if the user identified by username has permission to view the dashboard identified by the DashboardId, false otherwise. This method should also return false if the dashboard specified by the DashboardId doesn't exist.

Parameters:
dashboardId - the DashboardId of the dashboard the user is trying to view
username - the name of the user logged in, null if no user is currently logged in
Returns:
true if the user identified by username has permission to view the dashboard identified by the DashboardId, false otherwise.

isWritableBy

boolean isWritableBy(com.atlassian.gadgets.dashboard.DashboardId dashboardId,
                     @Nullable
                     String username)
Returns true if the user identified by username has permission to modify the dashboard identified by the DashboardId, false otherwise. This method should also return false if the dashboard specified by the DashboardId doesn't exist.

Parameters:
dashboardId - the DashboardId of the dashboard the user is trying to modify
username - the name of the user logged in, null if no user is currently logged in
Returns:
true if the user identified by username has permission to modify the dashboard identified by the DashboardId, false otherwise.


Copyright © 2011 Atlassian. All Rights Reserved.