public class ProjectIconTypePolicy extends Object implements IconTypePolicy
IconTypePolicy
for icons for Project
s.Constructor and Description |
---|
ProjectIconTypePolicy(GlobalPermissionManager globalPermissionManager,
PermissionManager permissionManager,
ProjectService projectService,
ProjectManager projectManager) |
Modifier and Type | Method and Description |
---|---|
boolean |
userCanCreateFor(ApplicationUser remoteUser,
IconOwningObjectId owningObjectId)
Check if the user could create an avatar for this owning object.
|
boolean |
userCanDelete(ApplicationUser remoteUser,
Avatar icon)
Check if the user can delete the icon.
|
boolean |
userCanView(ApplicationUser remoteUser,
Avatar icon)
Check if the user can view the icon.
|
public ProjectIconTypePolicy(GlobalPermissionManager globalPermissionManager, PermissionManager permissionManager, ProjectService projectService, ProjectManager projectManager)
public boolean userCanView(@Nullable ApplicationUser remoteUser, @Nonnull Avatar icon)
IconTypePolicy
userCanView
in interface IconTypePolicy
remoteUser
- user whose permissions should be used. Null means anonymous access.icon
- The icon that the user wishes to access.public boolean userCanDelete(@Nullable ApplicationUser remoteUser, @Nonnull Avatar icon)
IconTypePolicy
userCanDelete
in interface IconTypePolicy
remoteUser
- user whose permissions should be used. Null means anonymous access.icon
- The icon that the user wishes to delete.public boolean userCanCreateFor(@Nullable ApplicationUser remoteUser, @Nonnull IconOwningObjectId owningObjectId)
IconTypePolicy
userCanCreateFor
in interface IconTypePolicy
remoteUser
- user whose permissions should be used. Null means anonymous access.owningObjectId
- id of the object to which this avatar is connected to. This helps set the scope for
the provider of the IconType
to determine permissions for icons that
have not been created yet.Copyright © 2002-2017 Atlassian. All Rights Reserved.