Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove dev feature guard of PAT #6499

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import DetailsForm from '@/components/DetailsForm';
import FormCard from '@/components/FormCard';
import UnsavedChangesAlertModal from '@/components/UnsavedChangesAlertModal';
import { profilePropertyReferenceLink } from '@/consts';
import { isDevFeaturesEnabled } from '@/consts/env';
import CodeEditor from '@/ds-components/CodeEditor';
import FormField from '@/ds-components/FormField';
import TextInput from '@/ds-components/TextInput';
Expand Down Expand Up @@ -166,7 +165,7 @@ function UserSettings() {
<FormField title="user_details.mfa.field_name">
<UserMfaVerifications userId={user.id} />
</FormField>
{isDevFeaturesEnabled && <PersonalAccessTokens userId={user.id} />}
<PersonalAccessTokens userId={user.id} />
</FormCard>
<FormCard title="user_details.user_profile">
<FormField title="user_details.field_name">
Expand Down
5 changes: 1 addition & 4 deletions packages/core/src/routes/admin-user/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { EnvSet } from '../../env-set/index.js';
import type { ManagementApiRouter, RouterInitArgs } from '../types.js';

import adminUserBasicsRoutes from './basics.js';
Expand All @@ -16,7 +15,5 @@ export default function adminUserRoutes<T extends ManagementApiRouter>(...args:
adminUserSocialRoutes(...args);
adminUserOrganizationRoutes(...args);
adminUserMfaVerificationsRoutes(...args);
if (EnvSet.values.isDevFeaturesEnabled) {
adminUserPersonalAccessTokenRoutes(...args);
}
adminUserPersonalAccessTokenRoutes(...args);
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
{
"tags": [
{
"name": "Dev feature"
}
],
"paths": {
"/api/users/{userId}/personal-access-tokens": {
"get": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,10 @@ import {
} from '#src/api/application.js';
import { createResource, deleteResource } from '#src/api/resource.js';
import { createUserByAdmin } from '#src/helpers/index.js';
import {
devFeatureTest,
generatePassword,
generateUsername,
getAccessTokenPayload,
} from '#src/utils.js';
import { generatePassword, generateUsername, getAccessTokenPayload } from '#src/utils.js';

const tokenType = 'urn:logto:token-type:personal_access_token';

const { describe, it } = devFeatureTest;

describe('Token Exchange (Personal Access Token)', () => {
const username = generateUsername();
const password = generatePassword();
Expand Down
Loading