* feat: add enterprise license activation and deactivation endpoints - Implemented `EnterpriseLicenseActivateEndpoint` and `EnterpriseLicenseDeactivateEndpoint` for managing enterprise licenses. - Updated URL routing to include new endpoints for activating and deactivating enterprise licenses. - Added necessary request handling and response structures for enterprise license operations. - Enhanced existing license management logic to accommodate enterprise-specific requirements. * feat: add enterprise plan invite and update handling - Implemented `handle_enterprise_plan_invite_case` to manage invites under the enterprise plan. - Added `handle_enterprise_plan_update_case` for role updates within the enterprise plan. - Updated `handle_cloud_payments` to incorporate new enterprise plan handling logic for invites and role updates. * feat: add enterprise license management endpoints - Introduced new endpoints for managing enterprise licenses, including `InstanceLicenseSyncEndpoint`, `EnterpriseModifySeatsEndpoint`, `EnterpriseSubscriptionPortalEndpoint`, and `EnterpriseSubscriptionProrationPreviewEndpoint`. - Updated URL routing to accommodate the new endpoints for enterprise license operations. - Enhanced the views and API interactions to support enterprise license modifications and subscription management. * feat: enhance enterprise license activation and management - Updated `EnterpriseLicenseActivateEndpoint` to allow any user to access the activation endpoint. - Introduced new airgapped activation handler for enterprise licenses, enabling file uploads and processing of activation files. - Added routes for enterprise license activation in airgapped mode, including file handling and database population. - Enhanced error handling and response structures for better user feedback during activation processes. * chore: add python-ldap dependency to base requirements * chore: ldap authentication * feat: implement LDAP authentication endpoints and error handling * feat: add LDAP configuration options and remove unused group settings * feat: implement instance license management features - Added new components and hooks for managing instance licenses, including activation via license key and file uploads. - Introduced `InstanceManagementStore` to handle license operations and state management. - Created UI components for license management, including forms for entering license keys and uploading license files. - Enhanced API interactions for license activation and deactivation, with improved error handling and user feedback. - Updated routing and layout for the instance management page to accommodate new features. * feat: add LDAP authentication support with configuration UI - Implemented LDAP authentication page and configuration form. - Updated authentication modes to include LDAP option. - Added necessary API endpoints and types for LDAP settings. - Enhanced UI components to support LDAP integration. - Introduced new logo for LDAP and updated related components. * refactor: replace regular imports with type imports for improved clarity across multiple components * fix: admin build * refactor: update enterprise license API paths and enhance error handling - Changed API paths for enterprise license endpoints to include "instances" in the URL structure. - Improved error handling in the EnterpriseLicenseActivateEndpoint and EnterpriseLicenseDeactivateEndpoint to return more specific error messages based on response status codes. - Added logging configuration for "plane.payments" in both local and production settings. * feat: add InstanceLicenseEndpoint for retrieving current enterprise license plan - Introduced InstanceLicenseEndpoint to fetch the current enterprise license plan from the payment server. - Updated URL routing to include the new endpoint for instance licenses. - Enhanced error handling for the new endpoint to manage various response scenarios. * refactor: reorganize imports and improve code structure in LDAP authentication components * feat: add support for OIDC, SAML, and LDAP authentication in AuthRoot component * feat: implement unified OAuth configuration hooks for improved authentication options * feat: enhance authentication options by adding Gitea support and restructuring OAuth hooks * refactor: add Unified OAuth Configuration and Missing Gitea Options - Replaced the AuthenticationModes component with a more streamlined implementation using AuthenticationMethodCard. - Removed obsolete authentication modes files from the codebase. - Enhanced the AuthRoot component to utilize the new OAuth configuration hook for better management of authentication options. - Updated type definitions for instance authentication modes to reflect the new structure. * chore: remove space app extended auths * refactor: update OAuth type imports and remove obsolete types - Replaced local type imports with centralized imports from @plane/types in core, extended, and index OAuth hooks. - Removed the now redundant types.ts file as its definitions have been migrated. - Enhanced type definitions for OAuth options to improve consistency across the application. * refactor: enhance OAuth options type definition - Updated the OAuth options array to use the new TOAuthOption type for improved type safety and consistency. - Adjusted type imports to include TOAuthOption alongside TOAuthConfigs. * feat: add new Gitea logo and update OAuth icon imports to use standard HTML img tags * feat: add LDAP authentication route and update related components to use standard HTML img tags * chore: remove unused authentication logos and upgrade button component * refactor: remove UpgradeButton component and related exports; update authentication mode types for better clarity * feat: add LDAP authentication support and enhance feature flag handling in configuration * feat: add billing and user management pages, update sidebar menu - Introduced new routes for billing and user management in the admin dashboard. - Updated the sidebar menu to include links for the new billing and user management pages. - Refactored existing components to utilize a new PageWrapper for consistent layout across pages. - Enhanced the AI, authentication, and image pages with the new PageWrapper for improved UI consistency. * fix: adjust icon sizes * feat: enterprise license activation UI * fix: remove unnecessary shrink-0 class from header actions div in PageWrapper * fix: update error handling in enterprise license endpoints - Removed unnecessary newline in the Python API view for instance licenses. - Changed the response in the Go handler to return a success status with a message when no enterprise license exists, instead of an internal server error. * feat: enhance enterprise license management and update dependencies * refactor: simplify EnterprisePlanCard and enhance button handling - Removed unnecessary props and state management from EnterprisePlanCard. - Updated PlanCard to conditionally render the button. - Enhanced BillingActionsButton to provide tooltips for Enterprise plan users. - Adjusted limit-reached-info to reflect Enterprise plan status in seat management. * style: update modal styling for enterprise license success component * refactor: streamline enterprise license deactivation process - Removed the requirement for a license key in the Python API view. - Simplified the Go handler by eliminating unnecessary payload parsing and improved the response structure for cases with no existing enterprise license. * refactor: remove InstanceLicenseActions component and clean up related code - Deleted the InstanceLicenseActions component to streamline the enterprise license management. - Updated EnterprisePlanCard to conditionally render components based on the subscription status. - Removed unused props and functions related to trial period checks from the instance management store and types. * refactor: simplify GetEnterpriseLicenseCurrentPlan response structure - Removed unnecessary fields from the response for both existing and new enterprise licenses. - Streamlined the JSON output to focus on essential information, enhancing clarity and reducing payload size. * feat: implement seat management functionality for enterprise licenses - Added InstanceLicenseActions component to handle license synchronization and deactivation. - Introduced SeatsManagementButton for managing seat additions and removals. - Created modals and forms for adding and removing seats, including proration previews. - Updated EnterprisePlanCard to integrate new seat management features. - Enhanced instance management store with methods for updating subscription details and managing seats. * feat: enhance enterprise plan user guidance and UI updates * refactor: update instance management service usage and rename seat form components * fix: closure issues in enterprise plan card and instance management store * feat: add endpoint to remove unused seats from enterprise licenses - Introduced EnterpriseLicenseRemoveUnusedSeatsEndpoint to handle the removal of unused seats. - Updated URL routing to include the new endpoint. - Refactored user count retrieval logic to streamline seat management processes. * feat: enhance LDAP authentication form with service details and UI improvements - Added LDAP service details section to the LDAP configuration form, providing users with the authentication endpoint and relevant descriptions. - Updated the layout of the form for better user experience, including responsive design adjustments and improved button styling. - Refactored the page structure to utilize a PageWrapper component for consistent layout management. - Removed unused imports and cleaned up code for better maintainability. * fix: remove duplicate workspaceSlug prop from RemoveUnusedSeatsModal in GlobalModals component * refactor: streamline LDAPProvider configuration and error handling * chore: change the enterprise member count * feat: enhance seat management UI and logic for subscription levels - Updated the SelectSeatsStep component to display different messages based on subscription level (workspace vs instance). - Modified the ConfirmPriceStep to reflect the subscription level in the confirmation message. - Added subscription level handling in the AddSeatsForm component. - Improved the invitation description to differentiate between Enterprise and non-Enterprise plans. - Introduced a new field for allowed total users in the TMemberInviteCheck type for Enterprise plans. - Refactored styles for better UI consistency in the NumberInputWithControls component. * feat: implement enterprise plan invite check for workspace - Added a method to check the allowed total users for inviting new members based on the enterprise plan. - Integrated the invite check into the existing endpoint response, providing clarity on user limits for enterprise workspaces. - Enhanced the logic to count current active and invited users, ensuring accurate seat management for enterprise licenses. * refactor: remove unused import in workspace invite check endpoint - Eliminated the unused import of handle_enterprise_plan_invite_case from the invite.py file, streamlining the code and improving maintainability. * style: update background colors in authentication forms - Changed background color from 'bg-layer-1/60' to 'bg-layer-3' in various authentication forms for Gitea, GitHub, Google, GitLab, OIDC, SAML, and LDAP to enhance UI consistency. - Removed unused mobile service details section in the LDAP form. * feat: implement LDAP authentication page and refactor routing - Added a new LDAP authentication page with a form for user credentials. - Introduced error handling for LDAP authentication errors with descriptive messages. - Refactored route merging logic into a separate helper function for better maintainability. - Updated extended routes to include the new LDAP route. - Enhanced UI components for consistency across authentication forms. * style: refine LDAP form input styles - Removed border styles from username and password input fields in the LDAP form for a cleaner look. - Adjusted class names to enhance UI consistency across authentication forms. * fix: update enterprise plan user limit check in invitation description * feat: add cloud routes and integrate with extended routes - Introduced a new file for cloud routes. - Updated extended routes to include cloud routes using a merge function. * feat: add authentication translations for multiple languages - Introduced new translation keys for authentication, including username labels and LDAP headers, across various languages (cs, de, es, fr, id, it, ja, ko, pl, pt-BR, ro, ru, sk, tr-TR, ua, vi-VN, zh-CN, zh-TW). - Enhanced user experience by providing localized content for login and authentication processes. * fix: format --------- Co-authored-by: Prateek Shourya <[email protected]> Co-authored-by: b-saikrishnakanth <[email protected]>
52 lines
1.8 KiB
TypeScript
52 lines
1.8 KiB
TypeScript
import { observer } from "mobx-react";
|
|
import Link from "next/link";
|
|
// icons
|
|
import { Settings2 } from "lucide-react";
|
|
// plane internal packages
|
|
import { getButtonStyling } from "@plane/propel/button";
|
|
import type { TInstanceAuthenticationMethodKeys } from "@plane/types";
|
|
import { ToggleSwitch } from "@plane/ui";
|
|
import { cn } from "@plane/utils";
|
|
// hooks
|
|
import { useInstance } from "@/hooks/store";
|
|
|
|
type Props = {
|
|
disabled: boolean;
|
|
updateConfig: (key: TInstanceAuthenticationMethodKeys, value: string) => void;
|
|
};
|
|
|
|
export const GithubConfiguration = observer(function GithubConfiguration(props: Props) {
|
|
const { disabled, updateConfig } = props;
|
|
// store
|
|
const { formattedConfig } = useInstance();
|
|
// derived values
|
|
const enableGithubConfig = formattedConfig?.IS_GITHUB_ENABLED ?? "";
|
|
const isGithubConfigured = !!formattedConfig?.GITHUB_CLIENT_ID && !!formattedConfig?.GITHUB_CLIENT_SECRET;
|
|
|
|
return (
|
|
<>
|
|
{isGithubConfigured ? (
|
|
<div className="flex items-center gap-4">
|
|
<Link href="/authentication/github" className={cn(getButtonStyling("link", "base"), "font-medium")}>
|
|
Edit
|
|
</Link>
|
|
<ToggleSwitch
|
|
value={Boolean(parseInt(enableGithubConfig))}
|
|
onChange={() => {
|
|
const newEnableGithubConfig = Boolean(parseInt(enableGithubConfig)) === true ? "0" : "1";
|
|
updateConfig("IS_GITHUB_ENABLED", newEnableGithubConfig);
|
|
}}
|
|
size="sm"
|
|
disabled={disabled}
|
|
/>
|
|
</div>
|
|
) : (
|
|
<Link href="/authentication/github" className={cn(getButtonStyling("secondary", "base"), "text-tertiary")}>
|
|
<Settings2 className="h-4 w-4 p-0.5 text-tertiary" />
|
|
Configure
|
|
</Link>
|
|
)}
|
|
</>
|
|
);
|
|
});
|