@classmethod
    def menu_auth(cls, **attr):

        auth = current.auth

        if not auth.is_logged_in():
            request = current.request
            login_next = URL(args=request.args, vars=request.get_vars)
            if request.controller == "default" and \
               request.function == "user" and \
               "_next" in request.get_vars:
                login_next = request.get_vars["_next"]

            menu_auth = MM("Log in", c="default", f="user", m="login",
                           _id="auth_menu_login",
                           vars=dict(_next=login_next), **attr)
        else:
            # Logged-in
            user = auth.user

            greeting = "Welcome, %s!" % user.first_name
            if user.org_group_id:
                menu_auth = MM(greeting, c="org", f="group",
                               args=[user.org_group_id, "dashboard"],
                               translate=False,
                               _id="auth_menu_email",
                               **attr)
            else:
                # User is not associated with a coalition
                menu_auth = MM(greeting,
                               link=False,
                               translate=False,
                               _id="auth_menu_email",
                               **attr)

            menu_auth(MM("Your Maps", c="gis", f="config",
                          args="datalist",
                          vars={"~.pe_id__belongs": user.pe_id}),
                      MM("Admin Users", c="admin", f="user"),
                      MM("Edit Profile", c="default", f="user", m="profile"),
                      MM("Change Password", c="default", f="user", m="change_password"),
                      MM("Logout", c="default", f="user", m="logout", _id="auth_menu_logout"),
                      )

        return menu_auth

    # -------------------------------------------------------------------------
Flush the finished and unfinished tasks to the files on disk.
dataset/ETHPy150Open sahana/eden/modules/templates/CRMT/menus.py/S3MainMenu.menu_auth--crossover with--dataset/ETHPy150Open sjl/t/t.py/TaskDict.write