public class MockProjectIconTypePolicy extends ProjectIconTypePolicy implements IconTypePolicy
| Constructor and Description |
|---|
MockProjectIconTypePolicy() |
MockProjectIconTypePolicy(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 MockProjectIconTypePolicy()
public MockProjectIconTypePolicy(GlobalPermissionManager globalPermissionManager, PermissionManager permissionManager, ProjectService projectService, ProjectManager projectManager)
public boolean userCanView(@Nullable ApplicationUser remoteUser, @Nonnull Avatar icon)
IconTypePolicyuserCanView in interface IconTypePolicyuserCanView in class ProjectIconTypePolicyremoteUser - 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)
IconTypePolicyuserCanDelete in interface IconTypePolicyuserCanDelete in class ProjectIconTypePolicyremoteUser - 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)
IconTypePolicyuserCanCreateFor in interface IconTypePolicyuserCanCreateFor in class ProjectIconTypePolicyremoteUser - 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-2021 Atlassian. All Rights Reserved.