gui/backend/gui_plugin/users/UserManagement.py
def list_user_privileges(username, web_session=None):
    """Lists all privileges assigned to a user.

    Args:
        username (str): The name of the user.
        web_session (object): The webserver session object, optional. Will be
            passed in by the webserver automatically

    Returns:
        The generated shell request record.
    """
    with BackendDatabase(web_session) as db:
        return db.select('''SELECT r.name, pt.name, p.name, p.access_pattern
            FROM privilege p
                INNER JOIN role_has_privilege r_p
                    ON p.id = r_p.privilege_id
                INNER JOIN user_has_role u_r
                    ON r_p.role_id = u_r.role_id
                INNER JOIN privilege_type pt
                    ON p.privilege_type_id=pt.id
                INNER JOIN user u
                    ON u_r.user_id = u.id
                INNER JOIN role r
                    ON u_r.role_id = r.id
            WHERE upper(u.name) = upper(?)''', (username,))
Lists all privileges assigned to a user.

    Args:
        username (str): The name of the user.
        web_session (object): The webserver session object, optional. Will be
            passed in by the webserver automatically

    Returns:
        The generated shell request record.
    
Lists all privileges assigned to a user.
Lists all privileges assigned to a user .
def list_user_privileges(username, web_session=None):
    with BackendDatabase(web_session) as db:
        return db.select('''SELECT r.name, pt.name, p.name, p.access_pattern
            FROM privilege p
                INNER JOIN role_has_privilege r_p
                    ON p.id = r_p.privilege_id
                INNER JOIN user_has_role u_r
                    ON r_p.role_id = u_r.role_id
                INNER JOIN privilege_type pt
                    ON p.privilege_type_id=pt.id
                INNER JOIN user u
                    ON u_r.user_id = u.id
                INNER JOIN role r
                    ON u_r.role_id = r.id
            WHERE upper(u.name) = upper(?)''', (username,))
def list_user_privileges ( username , web_session = None ) : with BackendDatabase ( web_session ) as db : return db . select ( '''SELECT r.name, pt.name, p.name, p.access_pattern
            FROM privilege p
                INNER JOIN role_has_privilege r_p
                    ON p.id = r_p.privilege_id
                INNER JOIN user_has_role u_r
                    ON r_p.role_id = u_r.role_id
                INNER JOIN privilege_type pt
                    ON p.privilege_type_id=pt.id
                INNER JOIN user u
                    ON u_r.user_id = u.id
                INNER JOIN role r
                    ON u_r.role_id = r.id
            WHERE upper(u.name) = upper(?)''' , ( username , ) )
Lists all privileges assigned to a user.
Lists all privileges assigned to a user .
"""Lists all privileges assigned to a user.

    Args:
        username (str): The name of the user.
        web_session (object): The webserver session object, optional. Will be
            passed in by the webserver automatically

    Returns:
        The generated shell request record.
    """
The generated shell request record.
The generated shell request record .
username
The name of the user.
The name of the user .
web_session
The webserver session object, optional. Will be
passed in by the webserver automatically
The webserver session object optional . Will be passed in by the webserver automatically