|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PermissionService
Provide a way to determine if a user has permission to perform the given operations.
Method Summary | |
---|---|
boolean |
canConfigureDirectory(String username)
Returns true if the user identified by username has permission to add new external gadgets to the
directory, remove external gadgets that were previously added, and otherwise configure the directory. |
boolean |
isReadableBy(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(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 |
---|
boolean isReadableBy(DashboardId dashboardId, @Nullable String username)
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.
dashboardId
- the DashboardId
of the dashboard the user is trying to viewusername
- the name of the user logged in, null
if no user is currently logged in
true
if the user identified by username
has permission to view the dashboard identified
by the DashboardId
, false
otherwise.boolean isWritableBy(DashboardId dashboardId, @Nullable String username)
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.
dashboardId
- the DashboardId
of the dashboard the user is trying to modifyusername
- the name of the user logged in, null
if no user is currently logged in
true
if the user identified by username
has permission to modify the dashboard identified
by the DashboardId
, false
otherwise.boolean canConfigureDirectory(@Nullable String username)
true
if the user identified by username
has permission to add new external gadgets to the
directory, remove external gadgets that were previously added, and otherwise configure the directory. Returns
false
if the specified user does not have this permission. Generally, this permission should be
restricted to administrators, as gadgets have security considerations that can impact the whole system.
username
- the name of the user logged in, null
if no user is currently logged in
true
if the user identified by username
has permission to configure the directory,
false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |