001 /**
002 * Copyright 2004-2013 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.hr.time.permissions;
017
018 import org.kuali.hr.lm.leaveblock.LeaveBlock;
019 import org.kuali.hr.time.authorization.DepartmentalRule;
020 import org.kuali.hr.time.timeblock.TimeBlock;
021 import org.kuali.hr.time.timesheet.TimesheetDocument;
022
023
024
025 public interface TkPermissionsService {
026
027 public boolean canAddTimeBlock();
028 public boolean canEditTimeBlockAllFields(TimeBlock tb);
029 //public boolean canEditTimeBlockAssignmentOnly(TimeBlock tb);
030 public boolean canEditTimeBlock(TimeBlock tb);
031 public boolean canDeleteTimeBlock(TimeBlock tb);
032 public boolean canEditLeaveBlock(LeaveBlock lb);
033 public boolean canDeleteLeaveBlock(LeaveBlock lb);
034 public boolean canViewAdminTab();
035 public boolean canViewClockTab();
036 public boolean canViewApproverTab();
037 public boolean canViewTimeDetailTab();
038 public boolean canViewBatchJobsTab();
039 public boolean canViewPersonInfoTab();
040 public boolean canViewLeaveAccrualTab();
041 public boolean canViewTimesheet(TimesheetDocument doc);
042 public boolean canViewTimesheet(String documentId);
043 public boolean canEditTimesheet(TimesheetDocument doc);
044 public boolean canEditTimesheet(String documentId);
045 public boolean canSubmitTimesheet(TimesheetDocument doc);
046 public boolean canSubmitTimesheet(String docId);
047 public boolean canApproveTimesheet(TimesheetDocument doc);
048 public boolean canViewLinkOnMaintPages();
049 public boolean canViewDeptMaintPages();
050 public boolean canViewDeptMaintPages(DepartmentalRule dr);
051 public boolean canEditDeptMaintPages();
052 public boolean canEditDeptMaintPages(DepartmentalRule dr);
053 public boolean canWildcardWorkAreaInDeptRule(DepartmentalRule dr);
054 public boolean canWildcardDeptInDeptRule(DepartmentalRule dr);
055 public boolean canEditOvertimeEarnCode(TimeBlock tb);
056 public boolean canEditRegEarnCode(TimeBlock tb);
057 public boolean canDeleteDeptLunchDeduction();
058 public boolean canAddSystemLevelRole();
059 public boolean canAddLocationLevelRoles();
060 public boolean canAddDepartmentLevelRoles();
061 public boolean canAddWorkareaLevelRoles();
062 public boolean canViewTimeTabs();
063 public boolean canViewLeaveTabsWithEStatus();
064 public boolean canViewLeaveTabsWithNEStatus();
065 /**
066 * Determine if given leave block is a accrual generated System Scheduled Timeoff usage that can be banked/transferred
067 * and if the leave block is on the current leave calendar entry of the current targeted user
068 * @param lb
069 * @return
070 */
071 public boolean canBankOrTransferSSTOUsage(LeaveBlock lb);
072 /**
073 * Determine if given leave block is a accrual generated System Scheduled Timeoff usage that can be transferred
074 * and if the leave block is on the current leave calendar entry of the current targeted user
075 * @param lb
076 * @return
077 */
078 public boolean canTransferSSTOUsage(LeaveBlock lb);
079 /**
080 * Determine if given leave block is a accrual generated System Scheduled Timeoff usage that can be banked
081 * and if the leave block is on the current leave calendar entry of the current targeted user
082 * @param lb
083 * @return
084 */
085 public boolean canBankSSTOUsage(LeaveBlock lb);
086 }