com.atlassian.gadgets.directory.spi
Interface DirectoryPermissionService

All Known Implementing Classes:
PermissionServiceImpl

public interface DirectoryPermissionService

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

Since:
2.0

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.
 

Method Detail

canConfigureDirectory

boolean canConfigureDirectory(@Nullable
                              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. 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.

Parameters:
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 configure the directory, false otherwise


Copyright © 2011 Atlassian. All Rights Reserved.