Exemplo n.º 1
0
 def change_role(self, board_member, new_role):
     obj = DataBoardManager.get_by(board=self, member=board_member.get_user_data())
     if new_role == 'manager':
         if obj is None:
             obj = DataBoardManager(board=self, member=board_member.get_user_data())
             session.add(obj)
     else:
         if obj is not None:
             obj.delete()
Exemplo n.º 2
0
 def change_role(self, board_member, new_role):
     obj = DataBoardManager.get_by(board=self, member=board_member.get_user_data())
     if new_role == 'manager':
         if obj is None:
             obj = DataBoardManager(board=self, member=board_member.get_user_data())
             session.add(obj)
     else:
         if obj is not None:
             obj.delete()
Exemplo n.º 3
0
 def remove_manager(self, board_member):
     obj = DataBoardManager.get_by(board=self,
                                   member=board_member.get_user_data())
     if obj is not None:
         obj.delete()
     self.remove_member(board_member)
Exemplo n.º 4
0
 def remove_manager(self, board_member):
     obj = DataBoardManager.get_by(board=self, member=board_member.get_user_data())
     if obj is not None:
         obj.delete()
     self.remove_member(board_member)