def METHOD_NAME(self):
    self.allow_journal_messages('.*dropping message while waiting for child to exit.*')
    b = self.browser
    m = self.machine
    # Log in without being authorized
    self.login_and_go("/playground/test", superuser=False)
    b.leave_page()
    b.check_superuser_indicator("Limited access")
    b.enter_page("/playground/test")
    b.click(".cockpit-internal-reauthorize button")
    b.wait_in_text(".cockpit-internal-reauthorize span", 'result:')
    self.assertEqual(b.text(".cockpit-internal-reauthorize span"), 'result: access-denied')
    # Log in again but be authorized
    b.relogin("/playground/test", superuser=True)
    b.leave_page()
    b.check_superuser_indicator("Administrative access")
    b.enter_page("/playground/test")
    b.click(".cockpit-internal-reauthorize button")
    b.wait_in_text(".cockpit-internal-reauthorize span", 'result:')
    self.assertEqual(b.text(".cockpit-internal-reauthorize span"), 'result: authorized')
    # Lock a file so that we can check that the lock went away
    # after deauthorizing.
    m.execute("touch /tmp/playground-test-lock")
    b.click(".lock-channel button")
    b.wait_in_text(".lock-channel span", 'locked')
    m.execute("! flock --nonblock /tmp/playground-test-lock true")
    # Deauthorize user
    b.drop_superuser()
    m.execute("flock --timeout 10 /tmp/playground-test-lock true")
    b.click(".cockpit-internal-reauthorize button")
    b.wait_in_text(".cockpit-internal-reauthorize span", 'result:')
    self.assertEqual(b.text(".cockpit-internal-reauthorize span"), 'result: access-denied')