code: def check_post_role(self):
          '''
          check the user role for docs.
          '''
          priv_dic = {'ADD': False, 'EDIT': False, 'DELETE': False, 'ADMIN': False}
          if self.userinfo:
              if self.userinfo.role[1] > '0':
                  priv_dic['ADD'] = True
              if self.userinfo.role[1] >= '1':
                  priv_dic['EDIT'] = True
              if self.userinfo.role[1] >= '3':
                  priv_dic['DELETE'] = True
              if self.userinfo.role[1] >= '2':
                  priv_dic['ADMIN'] = True
          return priv_dif check_post_role(self):
          '''
          check the user role for docs.
          '''
          priv_dic = {'ADD': False, 'EDIT': False, 'DELETE': False, 'ADMIN': False}
          if self.userinfo:
              if self.userinfo.role[1] > '0':
                  priv_dic['ADD'] = True
              if self.userinfo.role[1] >= '1':
                  priv_dic['EDIT'] = True
              if self.userinfo.role[1] >= '3':
                  priv_dic['DELETE'] = True
              if self.userinfo.role[1] >= '2':
                  priv_dic['ADMIN'] = True
          return priv_dic
docs: check the user role for docs.