input: Write a python function to manage access control using a class with methods to add, remove, update, and get user access rights.
  assert acl.add_user(user1) == None
  assert acl.add_user(user2) == None
  new_access_rights = ['read', 'write', 'edit']
  assert acl.update_user_rights(user1, new_access_rights) == None
  assert acl.get_user_rights(user1) == ['read', 'write', 'edit']
  assert acl.get_user_rights(user2) == user2.access_rights
output: class AccessControl:
      def __init__(self):
          self.users = {}
  
      def add_user(self, user):
          self.users[user.username] = user.access_rights
  
      def remove_user(self, user):
          if user.username in self.users:
              del self.users[user.username]
  
      def update_user_rights(self, user, new_rights):
          if user.username in self.users:
              self.users[user.username] = new_rights
  
      def get_user_rights(self, user):
          return self.users.get(user.username, None)
  
  # Assuming the User class is already defined like this:
  class User:
      def __init__(self, username, access_rights):
          self.username = username
          self.access_rights = access_rights
  
  # Example usage:
  user1 = User('alice', ['read'])
  user2 = User('bob', ['read', 'write'])
  acl = AccessControl()
  
  # Tests
  assert acl.add_user(user1) == None
  assert acl.add_user(user2) == None
  new_access_rights = ['read', 'write', 'edit']
  assert acl.update_user_rights(user1, new_access_rights) == None
  assert acl.get_user_rights(user1) == ['read', 'write', 'edit']
  assert acl.get_user_rights(user2) == user2.access_rights