Skip to content

Added attributes(Linkedin and Phone number)#3

Open
nathan-wibowo wants to merge 213 commits intomainfrom
added-attributes
Open

Added attributes(Linkedin and Phone number)#3
nathan-wibowo wants to merge 213 commits intomainfrom
added-attributes

Conversation

@nathan-wibowo
Copy link

No description provided.

parsing . must have first field as name , then look for email. strip away digit if it exist , and handle fields that could be there
…e. Changed 'name' to 'first_name' and added 'last_name' and 'intro' fields for better organization of user data. Updated logic to assign remaining fields to 'last_name' and trimmed whitespace from 'intro.interests'.
…utton to process the 'Intro' field using the new 'parse_input' function, updating session state with parsed user data (first name, last name, email, invited by). This improves user data organization and streamlines the input process.
…user form to initialize session state, improved input handling with a new 'Data to Parse' section, and updated the parsing logic to extract email and interests more effectively. Added username generation based on first and last names, ensuring a smoother user experience and better data organization.
…duced a new helper function to handle Eastern Time localization and updated the invite form to use this functionality for expiration date and time. Also, added 'pytz' to requirements for timezone support.
issue was that the username would not update after parse was used. now it works before or after parse or no parse.
vars added.
db dir added with options to initalize a db from the start and keep it updated.

optimization for the db to save time and resources

added shell for timeline dbtable

improved the search to search all fields and to display all fields
…ter migration to db

- Updated `create_user` function to sync newly created users with the local database and log admin events.
- Introduced `update_user_email` function for updating user email addresses in Authentik.
- Refined `should_sync_users` logic to determine sync necessity based on last sync time.
- Improved error handling and logging throughout user creation and email update processes.
- Enhanced UI forms for user creation and management, including reset functionality for form fields.
- Added new actions in the user management interface for better user interaction and management capabilities.

These changes improve the overall user management experience and ensure better synchronization with the Authentik API.
gitayam and others added 30 commits April 13, 2025 19:17
- Introduced a new tab for sending emails to users within the user management interface.
- Implemented SMTP configuration checks and email form with fields for recipient, subject, and message body.
- Added functionality to send emails with options for HTML formatting and included admin signature.
- Enhanced error handling and logging for email sending operations.
- Placeholder for future email history tracking included.
- Added a trailing slash to the USER_PATH constant for consistency.
- Implemented a new Bulk Email section in the user management interface, allowing administrators to send emails to selected users.
- Included SMTP configuration checks, email subject and body fields, and options for HTML formatting.
- Enhanced error handling and logging for email sending operations, providing feedback on success and failures.
- Introduced a new function to create users in Authentik, including detailed logging for request and response data.
- Implemented error handling for HTTP errors and request exceptions to improve robustness.
- Ensured sensitive information, such as passwords, is masked in logs for security.
- Updated the USER_PATH constant for consistency, maintaining the trailing slash.
- Added a new tab for managing user notes, allowing users to view, edit, and delete notes associated with individual users.
- Implemented functionality to create new notes, including validation and error handling.
- Updated user list display to include a note count for each user, improving visibility of user-related notes.
- Enhanced input parsing to support a standardized format for user data entry, improving user experience and data consistency.
- Improved logging for debugging and tracking user note operations.
… random 2-digit suffix

- Simplified the username generation logic by removing database checks and SSO queries.
- Added a random 2-digit suffix to the desired username for uniqueness.
- Updated tests to validate the new username format and ensure suffix is numeric.
…ctionality

- Enhanced the mock_streamlit fixture to include a broader range of Streamlit components using MagicMock for better test coverage.
- Introduced a new mock_session_state fixture to isolate session state testing.
- Updated tests to reflect changes in session state handling and removed unnecessary assertions.
- Improved username generation tests in test_username_generation_with_random_word.py to include a random 2-digit suffix and validate the format.
- Ensured integration tests for username generation align with the expected output format.
- Removed the management of 'current_page' from session state, simplifying page navigation logic.
- Introduced a default page selection mechanism based on available options.
- Updated the username generation function to include a random 2-digit suffix for enhanced uniqueness.
- Adjusted related components to ensure consistent handling of the current page across the application.
- Updated the create_user function to streamline user creation, including improved handling of attributes and optional password reset.
- Refactored reset_user_password to support both POST and PUT methods for password resets, enhancing error handling and logging.
- Added a new send_welcome_to_user function to facilitate sending welcome messages to new users.
- Improved discourse post creation logic to ensure proper integration with user attributes.
- Enhanced test coverage for user creation and password reset scenarios, including handling of method not allowed errors.
…and theme detection

- Updated `requirements.txt` to specify a minimum version for Streamlit.
- Enhanced `streamlit_app.py` by adding mobile-specific CSS loading, theme detection script, and responsive meta tags for improved user experience.
- Improved CSS styles in `custom.css` to support light and dark themes, including new variables for colors and responsive design adjustments.
- Refactored UI components in `common.py` to improve styling and layout, including user info display and login buttons.
- Updated `PKG-INFO` to reflect a new metadata version and added new source files for better organization.
- Enhanced test coverage with additional test files for authentication and UI components.
- Updated the create_user function to set a default value for password reset success and handle the reset task synchronously to avoid race conditions.
- Improved error logging for password reset failures and exceptions during the reset process.
- Updated metadata version in PKG-INFO and added new source files for better organization in the project structure.
- Enhanced test coverage with additional test files for authentication and related functionalities.
- Updated regex patterns in the simple_parse_input function to support a wider range of numbered formats, improving input flexibility.
- Added new test cases to validate parsing of various numbered formats, ensuring robustness in handling different input styles.
- Removed direct resetting of 'selected_groups' and 'group_selection' fields in the reset_create_user_form_fields function, replacing it with a reset to a default MAIN_GROUP_ID.
- Updated clear_parse_data function to ensure 'selected_groups' and 'group_selection' are reset to the default value upon clearing parse data.
- Enhanced test coverage for session state handling, including new assertions for group selection and parse input field clearing.
…nality

- Refactored `streamlit_app.py` to include a theme toggle component and mobile-friendly meta tags for improved responsiveness.
- Introduced new UI components in `components.py` for theme toggling and bottom navigation on mobile.
- Updated CSS files to support dark and light themes, enhancing overall styling and user experience.
- Improved mobile styles in `mobile.css` for better touch targets and layout adjustments.
- Removed deprecated theme detection script and streamlined logging setup.
- Enhanced form styling in `forms.py` to align with new design standards.
…ES.txt

- Updated the Metadata-Version in PKG-INFO from 2.2 to 2.4 for improved compatibility.
- Added multiple new source files related to authentication and UI components in SOURCES.txt to enhance project structure and organization.
- Included additional test files for comprehensive coverage of authentication functionalities.
…nd error handling

- Enhanced the layout of the user creation form by reorganizing input fields into structured rows for better accessibility.
- Implemented error handling for username availability checks, including suggestions for alternative usernames if conflicts arise.
- Improved session state management for form fields, ensuring proper initialization and updates.
- Added functionality to fetch and display available groups from Authentik, enhancing user experience during group assignment.
- Streamlined the parsing of user data input, allowing for more flexible data entry and improved feedback on parsing success.
- Updated logging for better debugging and error tracking during user creation processes.
- Introduced a new asynchronous function `test_smtp_connection` to validate SMTP settings and connection.
- Implemented error handling to provide feedback on connection success or failure.
- Displayed current SMTP configuration settings in the Streamlit app for user reference.
- Removed the previous implementation of `test_smtp_connection` to streamline the codebase.
… and functionality

- Introduced a tabbed interface for creating and sending invites, enhancing user experience.
- Added a label input field for invites and improved session state management for form fields.
- Streamlined group selection with multiselect options for both invite creation and sending.
- Implemented separate submit and clear buttons for better form handling.
- Enhanced error handling and feedback for invite creation and email sending processes.
- Ensured proper initialization of session state variables for invite forms.
- Improved filtering logic to check for the existence of columns before applying filters, ensuring robustness against missing data.
- Added handling for missing 'attributes', 'last_login', and 'is_active' columns, providing default values to maintain display integrity.
- Updated multi-select user selection to only display if usernames are available, enhancing user experience.
- Adjusted the indentation of the Back button to ensure proper functionality within the user selection flow.
…reamlit app

- Expanded the create_invite function to include additional parameters for email, name, expiry, created_by, and groups, enhancing invite customization.
- Improved header management by setting default headers if not provided.
- Updated the invite form in forms.py to eliminate reliance on session state, using direct input values for label, email, and name.
- Streamlined group selection handling and ensured proper expiry date generation based on user input.
- Enhanced error handling and feedback during invite creation and email sending processes.
- Introduced a new function `send_invite_email` in helpers.py to handle the sending of invitation emails, including comprehensive logging and error handling.
- Updated the invite form in forms.py to utilize the new email sending function, improving feedback on email delivery status.
- Enhanced error handling to display the invite link if email sending fails, ensuring users have access to the invitation regardless of email issues.
- Added necessary imports to support the new functionality and maintain code organization.
- Added buttons for "Clear Message" and "Create Another Invite" to the invite message creation process, improving user interaction.
- Updated CSS styles in forms.py for better visual consistency, including enhancements to button styling and form layout.
- Implemented responsive design adjustments for mobile optimization, ensuring a seamless user experience across devices.
- Added logging to summarize fields that will be updated after rerun, improving traceability of changes.
- Expanded session state updates in the user creation form to include additional parsed fields, ensuring comprehensive data handling.
- Updated button definitions in the UI to include unique keys for better state management during interactions.
- Updated the `simple_parse_input` function to correctly identify and skip ordinal numbers (1st, 2nd, etc.) as list markers, improving data parsing accuracy.
- Enhanced logging to provide clearer insights when ordinal numbers are detected.
- Added a new test case in `test_input_format.py` to ensure ordinal numbers are treated as content, not list markers, validating the updated parsing logic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants