Example #1
0
 def get(self):
     u = self.user_info
     wUnits = wUnit1.query(wUnit1.ftype == "Template").order(wUnit1.unit_no)
     username = u['name'] if u else None
     params = {'username': username,
               'wUnits': wUnits}
     rbac(self, 'adminU', params)
Example #2
0
def pageCheck(self, username, unitNo):
    uChecks = wUnit1.query(wUnit1.author == username, wUnit1.unit_no == unitNo, wUnit1.ftype == 'Page', wUnit1.editS == "Started")
    uCheck = uChecks.fetch(1)
    if uCheck:
      status = True
      return status
    else:
      status = False
      return status
Example #3
0
def pageCheck(self, username, unitNo):
    uChecks = wUnit1.query(wUnit1.author == username, wUnit1.unit_no == unitNo,
                           wUnit1.ftype == 'Page', wUnit1.editS == "Started")
    uCheck = uChecks.fetch(1)
    if uCheck:
        status = True
        return status
    else:
        status = False
        return status
Example #4
0
 def get(self):
     u = self.user_info
     username = u['name']
     unitNo = '1'
     wUnits = wUnit1.query(wUnit1.ftype == "Template").order(wUnit1.unit_no)
     params = {
         'username': username,
         'wUnits': wUnits,
         'status': pageCheck(self, username, unitNo)
     }
     rbac(self, 'workbook', params)
Example #5
0
 def get(self):
       u = self.user_info
       username = u['name']
       unitNo = '1'
       wUnits = wUnit1.query(wUnit1.ftype == "Template").order(wUnit1.unit_no)
       params = {
       'username': username,
       'wUnits': wUnits,
       'status': pageCheck(self, username, unitNo)
       }
       rbac(self, 'workbook', params)
Example #6
0
 def get(self, unitSeq):
   u = self.user_info
   username = u['name']
   unitNo = unitSeq.split('A')
   PageCheck = wUnit1.query(wUnit1.author == username, wUnit1.unit_no == unitNo[0], wUnit1.ftype == 'Page').fetch(1)
   for check in PageCheck:
     pCheck = str(check.key.id())
   
   if PageCheck:
     url='/sue/' + pCheck
     self.redirect(url)
   else:
     url='/suc/'+ unitNo[1]
     self.redirect(url)
Example #7
0
    def get(self, unitSeq):
        u = self.user_info
        username = u['name']
        unitNo = unitSeq.split('A')
        PageCheck = wUnit1.query(wUnit1.author == username,
                                 wUnit1.unit_no == unitNo[0],
                                 wUnit1.ftype == 'Page').fetch(1)
        for check in PageCheck:
            pCheck = str(check.key.id())

        if PageCheck:
            url = '/sue/' + pCheck
            self.redirect(url)
        else:
            url = '/suc/' + unitNo[1]
            self.redirect(url)
Example #8
0
 def get(self):
     u = self.user_info
     wUnits = wUnit1.query(wUnit1.ftype == "Template").order(wUnit1.unit_no)
     username = u['name'] if u else None
     params = {'username': username, 'wUnits': wUnits}
     rbac(self, 'adminU', params)