예제 #1
0
 def notice():
     perm = ActionNeedPermission('flightlog', Finish)
     can = perm.can()
     return {
         'flight_log_notices': get_flightlog_unsubmit(perm=can),
         'can_flight_notices': can,
     }
예제 #2
0
파일: index.py 프로젝트: GSIL-Monitor/wxk
 def get_anno_list(self, max_count=None):
     perm = ActionNeedPermission(Announcement.__name__.lower(), View)
     if perm.can():
         items = Announcement.query.filter_by(statusName=Sented).order_by(
             'sendTime desc').limit(max_count).all()
     else:
         items = None
     return items
예제 #3
0
 def can_view_details_flightlog(self):
     return ActionNeedPermission('flightlog', View).can()
예제 #4
0
 def can_edit_flightlog(self):
     return ActionNeedPermission('flightlog', Edit).can()
예제 #5
0
 def can_delete_flightlog(self):
     return ActionNeedPermission('flightlog', Delete).can()
예제 #6
0
 def can_remove_status(self):
     perm = ActionNeedPermission(self._action_name, RemoveBoundStatus)
     return perm.can()
예제 #7
0
 def can_create_flightlog(self):
     return ActionNeedPermission('flightlog', Create).can()
예제 #8
0
 def can_lend(self):
     perm = ActionNeedPermission(
         LendApplication.__name__.lower(), Create)
     return perm.can()
예제 #9
0
 def can_edit_status(self):
     perm = ActionNeedPermission(self._action_name, EditBoundStatus)
     return perm.can()
예제 #10
0
 def can_routine_work(self):
     perm = ActionNeedPermission('routinework', 'create')
     return perm.can()
예제 #11
0
파일: index.py 프로젝트: GSIL-Monitor/wxk
 def can_aircraft(self):
     perm = ActionNeedPermission('aircraft', View)
     return perm.can()
예제 #12
0
 def can_finish(self):
     perm = ActionNeedPermission(self._view._action_name, Finish)
     return perm.can()
예제 #13
0
 def is_accessible(self):
     return ActionNeedPermission('flightlog', View).can()
예제 #14
0
 def can_borrowing_return(self):
     perm = ActionNeedPermission(
         BorrowingInReturnModel.__name__.lower(), Create)
     return perm.can()
예제 #15
0
 def can_repair(self):
     perm = ActionNeedPermission(
         RepairApplication.__name__.lower(), Create)
     return perm.can()
예제 #16
0
 def can_scrap(self):
     perm = ActionNeedPermission(Scrap.__name__.lower(), Create)
     return perm.can()
예제 #17
0
 def can_assemble(self):
     perm = ActionNeedPermission(
         AssembleApplication.__name__.lower(), Create)
     return perm.can()
예제 #18
0
 def can_loan(self):
     perm = ActionNeedPermission(
         LoanApplicationOrder.__name__.lower(), Create)
     return perm.can()
예제 #19
0
 def is_accessible(self):
     return ActionNeedPermission('formulastat', View).can()
예제 #20
0
def can_view_aircraft():
    return ActionNeedPermission('aircraft', View).can()
예제 #21
0
 def is_accessible(self):
     return ActionNeedPermission('expirewarning', View).can()
예제 #22
0
 def can_purchase(self):
     perm = ActionNeedPermission(
         PurchaseApplication.__name__.lower(), Create)
     return perm.can()