com.atlassian.greenhopper.service.rapid.view
Class RapidViewPermissionServiceImpl

java.lang.Object
  extended by com.atlassian.greenhopper.service.rapid.view.RapidViewPermissionServiceImpl
All Implemented Interfaces:
RapidViewPermissionService

@Service
public class RapidViewPermissionServiceImpl
extends java.lang.Object
implements RapidViewPermissionService


Constructor Summary
RapidViewPermissionServiceImpl()
           
 
Method Summary
 boolean canEdit(com.atlassian.crowd.embedded.api.User user, RapidView rapidView)
          You've got to either own the rapid view or be JIRA admin to do anything with it.
 boolean canEditOwner(com.atlassian.crowd.embedded.api.User user, RapidView rapidView)
          We only allow JIRA admins to change the owner.
 boolean canSeeRapidView(com.atlassian.crowd.embedded.api.User user, RapidView rapidView)
           
 ServiceOutcome<java.lang.Void> validateModifyPermission(com.atlassian.crowd.embedded.api.User user, RapidView view)
          Returns an error outcome if the user specified does not have permission to modify the given RapidView.
 void validateModifyPermission(com.atlassian.crowd.embedded.api.User user, RapidView view, ErrorCollection errors)
          Check that the user can actually modify the given rapid view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RapidViewPermissionServiceImpl

public RapidViewPermissionServiceImpl()
Method Detail

canEdit

public boolean canEdit(com.atlassian.crowd.embedded.api.User user,
                       RapidView rapidView)
You've got to either own the rapid view or be JIRA admin to do anything with it.

Specified by:
canEdit in interface RapidViewPermissionService
Returns:
if the user is allowed to Manage the RapidView: Edit column-status mappings, constraints, names, ...

canEditOwner

public boolean canEditOwner(com.atlassian.crowd.embedded.api.User user,
                            RapidView rapidView)
We only allow JIRA admins to change the owner. Gets around problems where a user can revoke his own rights

Specified by:
canEditOwner in interface RapidViewPermissionService
Returns:
if the user is allowed to edit the owner of a rapid view

validateModifyPermission

public void validateModifyPermission(com.atlassian.crowd.embedded.api.User user,
                                     RapidView view,
                                     ErrorCollection errors)
Description copied from interface: RapidViewPermissionService
Check that the user can actually modify the given rapid view. This requires him to be the owner or an admin.

Specified by:
validateModifyPermission in interface RapidViewPermissionService

validateModifyPermission

public ServiceOutcome<java.lang.Void> validateModifyPermission(com.atlassian.crowd.embedded.api.User user,
                                                               RapidView view)
Description copied from interface: RapidViewPermissionService
Returns an error outcome if the user specified does not have permission to modify the given RapidView.

Specified by:
validateModifyPermission in interface RapidViewPermissionService
Parameters:
user - the user performing the action
view - the view to modify
Returns:
outcome possibly containing errors

canSeeRapidView

public boolean canSeeRapidView(com.atlassian.crowd.embedded.api.User user,
                               RapidView rapidView)
Specified by:
canSeeRapidView in interface RapidViewPermissionService


Copyright © 2007-2012 Atlassian. All Rights Reserved.