human
Complete the below
def can_manage_email_dashboard(handler):

    ''''Decorator to check whether user can access email dashboard.'
    '''

=====
Give me a the Python code you requested?
assistant
#Here is the Python code you requested.
    def test_can_manage_emails(self, **kwargs):
        if (not self.user_id):
            raise base.UserFacingExceptions.NotLoggedInException
        if (role_services.ACTION_MANAGE_EMAIL_DASHBOARD in self.actions):
            return handler(self, **kwargs)
        raise self.UnauthorizedUserException('You    do    not    have    credentials    to    access    email    dashboard.')
    test_can_manage_emails.__wrapped__ = True
    return test_can_manage_emails