Commit graph

4,114 commits

Author SHA1 Message Date
Cristhian Zanforlin Lousa
c30cb3e002 Merge branch 'authentication' into login 2023-08-11 08:22:37 -03:00
gustavoschaedler
580b439b80 🔧 chore(users.py): refactor and improve code readability in users.py
 feat(users.py): add docstrings to API endpoints for better documentation
🔥 chore(users.py): remove unnecessary code and comments
🐛 fix(users.py): fix return type hints in API endpoints
2023-08-11 03:52:02 +01:00
gustavoschaedler
0a5026a6ed 🔧 fix(auth.py): change refresh token expiration time from 180 minutes to 70 minutes for better security
🔧 fix(auth.py): change SECRET_KEY comment from "TODO" to "JUST FOR TEST" for clarity
🔧 fix(auth.py): change create_access_token function name to create_token for consistency
🔧 fix(auth.py): change create_refresh_token function to accept refresh_token parameter instead of data dictionary
🔧 fix(auth.py): change create_refresh_token function to decode and validate refresh_token before creating new user tokens
🔧 fix(auth.py): change authenticate_user function to use get_user_by_username instead of get_user
🔧 fix(auth.py): change get_current_user function to use get_user_by_username instead of get_user
🔧 fix(auth.py): change get_user function name to get_user_by_username for clarity
🔧 fix(users.py): change get_password_hash function to be inside the router scope for better encapsulation
🔧 fix(users.py): change add_user function to return UserListModel instead of User
🔧 fix(users.py): change update_user function to update user data based on UserPatchModel fields
🔧 fix(users.py): change update_user function to handle username conflicts and update user's updated_at field
🔧 fix(users.py): change delete_user function to delete user based on user_id
 feat(login.py): add refresh_token endpoint to refresh access token using refresh token
 feat(login.py): add refresh_token function to create new user tokens based on refresh token
 feat(login.py): add refresh_token endpoint to refresh access token using refresh token
 feat(login.py): add refresh_token function to create new user tokens based on refresh token
 feat(login.py): add refresh_token endpoint to refresh access token using refresh token
 feat(login.py): add refresh_token function to create new user tokens based on refresh token
 feat(login.py): add refresh_token endpoint to refresh access token using refresh token
 feat(login.py): add refresh_token function to create new user tokens based on refresh token
 feat(login.py): add refresh_token endpoint to refresh access token using refresh token
 feat(login.py): add refresh_token function to create new user tokens based on refresh token
 feat(login.py): add refresh_token endpoint to refresh access token using refresh token
 feat(login.py): add refresh
2023-08-11 03:13:08 +01:00
Cristhian Zanforlin Lousa
b6794c76fd Merge branch 'authentication' into login 2023-08-10 15:27:33 -03:00
gustavoschaedler
f0f061ab46 🔒 chore(auth.py): increase access token expiration time to 60 minutes for better user experience
🔒 chore(auth.py): add refresh token functionality with expiration time of 180 minutes
🔒 chore(login.py): change token endpoint URL from /token to /login for better semantics
🔒 chore(login.py): add refresh token creation to login endpoint to provide a refresh token along with the access token
2023-08-10 19:05:11 +01:00
Gabriel Luiz Freitas Almeida
83631606d3 🐛 fix(manager.py): fix undefined variable 'database_url' error in _create_engine method
 feat(manager.py): add support for SQLite database by setting connect_args in create_engine method
2023-08-10 11:30:06 -03:00
anovazzi1
d6d5aae1ef Merge branch 'authentication' into login 2023-08-10 10:44:48 -03:00
anovazzi1
10d3fc6939 format code 2023-08-10 10:41:49 -03:00
anovazzi1
04db803f34 format code 2023-08-10 10:41:06 -03:00
anovazzi1
f7fdc5d7bc feat(App.tsx): add support for displaying header component on all pages except login and signup pages to improve user experience 2023-08-10 10:33:01 -03:00
igorrCarvalho
33944e5baf refactor[loginPage]: Refactor login Page to use Form UI Radix Modal 2023-08-10 03:22:18 -03:00
igorrCarvalho
69ec2681bd refactor[signUpPage]: refactor sign up page to use radix ui form modal 2023-08-10 02:26:06 -03:00
Cristhian Zanforlin Lousa
9bccb95cd0 Merge branch 'login-admin' into login 2023-08-09 20:34:53 -03:00
Cristhian Zanforlin Lousa
5a690ecb6f 🔨 refactor(AdminPage/index.tsx): improve code formatting and structure for better readability and maintainability 2023-08-09 20:34:36 -03:00
igorrCarvalho
21f47e6c4d refactor: Remove unnecesary email field 2023-08-09 20:30:02 -03:00
igorrCarvalho
3348bfbcb6 merge login into login 2023-08-09 20:14:33 -03:00
igorrCarvalho
468f6ec573 feat: Add signUp page and Sign out button 2023-08-09 20:06:22 -03:00
Cristhian Zanforlin Lousa
075e9dc254 🐛 fix(AdminPage/index.tsx): adjust height of custom-scroll div to improve layout consistency 2023-08-09 20:05:31 -03:00
anovazzi1
5ae597497e
Add Admin Login Page with User Management (#737)
This pull request introduces a new admin login page to the application,
enhancing the user management experience by implementing a user table
with pagination. This will allow administrators to efficiently manage
users, edit passwords, delete accounts, and apply filters through a
user-friendly table interface.

/login/admin - Just click login
2023-08-09 19:46:41 -03:00
Cristhian Zanforlin Lousa
5009715835 🔧 fix(PaginatorComponent): remove unused imports and replace lucide-react icons with IconComponent for better modularity and reusability
 feat(PaginatorComponent): add support for custom icons using IconComponent for better customization options
🔧 fix(UserManagementModal): remove unused imports and fix import order for better organization
 feat(UserManagementModal): add password confirmation validation and reset form on modal open for better user experience
🔧 fix(UserManagementModal): fix modal size to be full height for better visibility and usability
 feat(UserManagementModal): add form fields for username and password with validation for better user input handling
🔧 fix(UserManagementModal): fix form field labels and error messages for better clarity and user guidance
 feat(UserManagementModal): add form submission and confirmation handling for better user interaction and data management
🔧 fix(UserManagementModal): fix cancel button styling for better consistency and user experience

🔧 fix(baseModal): add missing size options to the size prop to support additional modal sizes
 feat(baseModal): add support for "small-h-full" and "medium-h-full" sizes to allow modals with smaller height and full width
🔧 fix(AdminPage): import missing IconComponent and ShadTooltip components
 feat(AdminPage): add functionality to handle editing and adding new users
🔧 fix(applies.css): add missing semicolon to .field-invalid and .label-invalid classes
🔧 fix(styleUtils.ts): import missing Pencil, ChevronsRight, and ChevronsLeft icons
2023-08-09 19:33:46 -03:00
gustavoschaedler
f065a46950 Merge remote-tracking branch 'origin/dev' into authentication 2023-08-09 21:46:08 +01:00
Cristhian Zanforlin Lousa
26345cc9a6 📦 chore(frontend): update package.json to add @radix-ui/react-form dependency
🔨 refactor(PaginatorComponent): remove unnecessary whitespace in paginate prop
📝 docs(ConfirmationModal): add missing JSDoc comments and improve code readability
📝 docs(UserManagementModal): add missing JSDoc comments and improve code readability
🔨 refactor(baseModal): improve code readability by adding a div wrapper for headerChild

 feat(AdminPage/index.tsx): add Pencil icon from lucide-react library to the import statement to use it in the component
 feat(AdminPage/index.tsx): add ConfirmationModal and UserManagementModal components to import statements to use them in the component
🐛 fix(AdminPage/index.tsx): remove unused handleSaveClick function
 feat(AdminPage/index.tsx): add modalEditOpen and modalDeleteOpen states to handle the opening and closing of the modals
 feat(AdminPage/index.tsx): add handleEditUser function to handle the edit user functionality
🐛 fix(AdminPage/index.tsx): remove unused handleSaveClick function
 feat(AdminPage/index.tsx): add ConfirmationModal component to handle the delete user functionality
 feat(AdminPage/index.tsx): add UserManagementModal component to handle the edit user functionality
 feat(components/index.ts): add ConfirmationModalType and UserManagementType types to handle the props of ConfirmationModal and UserManagementModal components
🐛 fix(components/index.ts): add missing newline at the end of the file
 feat(utils/styleUtils.ts): add UserMinus2 and UserPlus2 icons from lucide-react library to the import statement
2023-08-09 12:13:58 -03:00
anovazzi1
5e370f3e34
Refactoring: Rename Generic Variable Names to More Descriptive Ones (#725)
This PR is a code refactoring initiative aiming to improve the
readability and maintainability of our codebase. It specifically targets
generic or non-descriptive variable names, renaming them to more
meaningful names that better express their purpose within the code.
2023-08-09 11:21:34 -03:00
Gabriel Luiz Freitas Almeida
be14d45589 🐛 fix(utils.py): handle CommandError when running migrations and delete alembic_version table if wrong revision in DB 2023-08-09 10:28:41 -03:00
Gabriel Luiz Freitas Almeida
61bee4424f
Add zip_path and workspace_url fields (#729) 2023-08-09 09:18:30 -03:00
Melvin Hillsman
f4ad8572e7 Add zip_path and workspace_url fields
As noted in the
[documentation](https://python.langchain.com/docs/integrations/document_loaders/slack)
for this plugin zip_path is the first named parameter not file_path and
workspace_url is the second with zip_path being required and
workspace_url being optional.

Fixes #695

Signed-off-by: Melvin Hillsman <mhillsma@redhat.com>
2023-08-08 21:01:34 -05:00
anovazzi1
9b523ad11c update templateName variable to templateField 2023-08-08 20:59:28 -03:00
gustavoschaedler
d243829893 ⬆️ chore(pyproject.toml): upgrade python-jose dependency to version 3.3.0 to ensure compatibility and take advantage of new features 2023-08-09 00:56:07 +01:00
anovazzi1
fccb004248 format code and fix merge errors generated after conflict 2023-08-08 20:53:39 -03:00
gustavoschaedler
f822581df3 🔧 chore(pyproject.toml): add passlib and bcrypt dependencies to improve password hashing and security 2023-08-09 00:47:11 +01:00
anovazzi1
303387a3ec Merge branch 'dev' into variables_refactor 2023-08-08 20:46:18 -03:00
Cristhian Zanforlin Lousa
a88bf657a7 📦 chore(authContext.tsx): add AuthContext component and its initial value to provide authentication-related data throughout the app
📦 chore(authContext.tsx): add login, logout, and refreshAccessToken functions to handle authentication logic
📦 chore(authContext.tsx): add userData state and setUserData function to store user data
📦 chore(baseModal/index.tsx): add "x-small" size option to BaseModal component to make it smaller
📦 chore(deleteAccountPage/index.tsx): create DeleteAccountPage component to handle account deletion logic
📦 chore(routes.tsx): add route for DeleteAccountPage component under /account/delete path
📦 chore(types/auth.ts): create AuthContextType and userData types to define the shape of authentication-related data
2023-08-08 20:15:37 -03:00
Cristhian Zanforlin Lousa
dd6d1e64f7 🔧 chore(frontend): add @radix-ui/react-select package to package.json dependencies
🔧 chore(frontend): add PaginatorComponent and Select component to the project

🔧 fix(api.tsx): comment out error retry logic to temporarily disable it

 feat(LoginPage): add login functionality for admin page

🆕 feat(AdminPage): add AdminPage component to display a list of users and provide filtering and pagination functionality
🐛 fix(AdminPage): fix handleInputChange function to update the password value correctly
🔨 refactor(AdminPage): refactor handleFilterUsers function to filter users based on user and email fields
🔥 chore(AdminPage): remove unused imports and console.log statements

 feat(routes.tsx): add routes for admin login and admin page to enable access to admin features
🔧 chore(components/index.ts): add PaginatorComponentType to define the type for a paginator component
2023-08-08 20:10:28 -03:00
gustavoschaedler
056ce51ad0 🐛 fix(login.py): change argument type of create_user_token function from str to User to improve type safety and clarity
🐛 fix(login.py): remove unnecessary type ignore comment in create_user_token function
🐛 fix(login.py): remove unnecessary type ignore comment in return statement of login_to_get_access_token function
🐛 fix(users.py): remove unnecessary async keyword from read_current_user function
🐛 fix(users.py): remove unnecessary async keyword from read_all_users function
🐛 fix(users.py): remove unnecessary async keyword from add_user function
🐛 fix(users.py): remove unnecessary async keyword from add_super_user_to_testing_purposes function
2023-08-08 22:20:53 +01:00
gustavoschaedler
3c6d46021d 🔧 chore(user.py): remove unnecessary line breaks and import formatting for better code readability
🔧 chore(main.py): fix indentation and remove unnecessary line breaks for better code readability
🔧 chore(login.py): fix indentation and add missing line breaks for better code readability
2023-08-08 22:09:38 +01:00
gustavoschaedler
1c28979766 🔀 refactor(users.py): rename router prefix from "/users" to "Login" to improve clarity and consistency 2023-08-08 22:08:51 +01:00
gustavoschaedler
4af08d99fc Merge remote-tracking branch 'origin/dev' into authentication 2023-08-08 22:05:23 +01:00
gustavoschaedler
59a55b4371 🔧 fix(auth.py): update import statements to reflect new file structure in langflow package
🔧 fix(auth.py): fix typo in verify_password function call
🔧 fix(auth.py): update get_user function call to reflect new file structure in langflow package
🔧 fix(auth.py): update get_current_user function signature to match the annotated type
🔧 fix(auth.py): update get_user function call to reflect new file structure in langflow package
🔧 fix(auth.py): update get_current_user function signature to match the annotated type
🔧 fix(auth.py): update get_user function call to reflect new file structure in langflow package
🔧 fix(auth.py): update get_current_user function signature to match the annotated type
🔧 fix(auth.py): update get_user function call to reflect new file structure in langflow package
🔧 fix(auth.py): update get_current_user function signature to match the annotated type
🔧 fix(auth.py): update get_user function call to reflect new file structure in langflow package
🔧 fix(auth.py): update get_current_user function signature to match the annotated type
🔧 fix(auth.py): update get_user function call to reflect new file structure in langflow package
🔧 fix(auth.py): update get_current_user function signature to match the annotated type
🔧 fix(auth.py): update get_user function call to reflect new file structure in langflow package
🔧 fix(auth.py): update get_current_user function signature to match the annotated type
🔧 fix(auth.py): update get_user function call to reflect new file structure in langflow package
🔧 fix(auth.py): update get_current_user function signature to match the annotated type
🔧 fix(auth.py): update get_user function call to reflect new file structure in langflow package
🔧 fix(auth.py): update get_current_user function signature to match the annotated type
🔧 fix(auth.py): update get_user function call to reflect new file structure in langflow package
🔧 fix(auth.py): update get_current_user function signature to match the annotated type
🔧 fix(auth.py): update get_user function call to reflect new file structure in langflow package
🔧 fix(auth.py): update get_current_user function signature to match the annotated type
🔧 fix(auth.py): update get_user function call to reflect
2023-08-08 21:19:22 +01:00
Gabriel Luiz Freitas Almeida
a33edf878c
Adds Migrations and Service Layer implementation (#723) 2023-08-08 17:11:08 -03:00
Gabriel Luiz Freitas Almeida
67f0ca7549 📦 chore(pyproject.toml): update orjson dependency from version 3.9.1 to 3.9.3 for bug fixes and improvements 2023-08-08 16:50:04 -03:00
Gabriel Luiz Freitas Almeida
4b47f9f196 🐛 fix(endpoints.py): add check to skip empty custom_component_dict to prevent potential errors 2023-08-08 16:35:15 -03:00
Gabriel Luiz Freitas Almeida
3170ac665a 📝 docs(pyproject.toml): add documentation link to the project configuration file 2023-08-08 16:15:30 -03:00
Gabriel Luiz Freitas Almeida
a6cacbf377 Merge branch 'dev' into migrations_service 2023-08-08 16:13:32 -03:00
Gabriel Luiz Freitas Almeida
a40a81b458 Merge remote-tracking branch 'origin/main' into dev 2023-08-08 16:12:12 -03:00
Gabriel Luiz Freitas Almeida
bae4792ed9
Fix flows not being able to run without input keys (#732) 2023-08-08 15:14:27 -03:00
Gabriel Luiz Freitas Almeida
ceff1a2833 Merge remote-tracking branch 'origin/main' into release 2023-08-08 15:13:49 -03:00
Gabriel Luiz Freitas Almeida
cf8c0601eb Revert "Merge branch 'main' into release"
This reverts commit 4dea0f6690, reversing
changes made to 597b2153a3.
2023-08-08 15:13:22 -03:00
Gabriel Luiz Freitas Almeida
b8d8ed8283 Revert "Revert "Fixes flows without input_keys not being runnable" (#731)"
This reverts commit 352e74cbc7, reversing
changes made to 3f531a1157.
2023-08-08 15:12:37 -03:00
Gabriel Luiz Freitas Almeida
4dea0f6690
Merge branch 'main' into release 2023-08-08 15:08:11 -03:00
Gabriel Luiz Freitas Almeida
597b2153a3 🔖 chore(pyproject.toml): bump version from 0.4.2 to 0.4.3 for langflow package 2023-08-08 15:06:38 -03:00