示例#1
0
  public boolean isAuthorized(String userId, AwardTask task) {

    AwardDocument doc = task.getAward().getAwardDocument();
    Award award = task.getAward();
    return award.isNew()
        ? canUserCreateAward(userId, award)
        : canUserModifyAward(userId, award, doc);
  }
 /**
  * @see org.kuali.kra.award.document.authorizer.AwardAuthorizer#isAuthorized(java.lang.String,
  *     org.kuali.kra.award.document.authorization.AwardTask)
  */
 @Override
 public boolean isAuthorized(String userId, AwardTask task) {
   return !task.getAward().getAwardDocument().isViewOnly()
       && hasPermission(
           userId, task.getAward(), AwardPermissionConstants.MODIFY_AWARD.getAwardPermission());
 }