Skip to content
Open
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
2 changes: 1 addition & 1 deletion packages/components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1893,7 +1893,7 @@ export type {
} from './internal/components/samples/models';
export type { SearchHit, SearchOptions } from './internal/components/search/actions';
export type { EntityFieldFilter } from './internal/components/search/models';
export type { SecurityAPIWrapper } from './internal/components/security/APIWrapper';
export type { AuthenticationConfiguration, SecurityAPIWrapper } from './internal/components/security/APIWrapper';
export type { IDataViewInfo } from './internal/DataViewInfo';
export type { BSStyle } from './internal/dropdowns';
export type { MenuSectionItem } from './internal/DropdownSection';
Expand Down
20 changes: 20 additions & 0 deletions packages/components/src/internal/components/security/APIWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ export interface RemoveGroupMembersResponse {
removed: number[];
}

export interface AuthenticationConfiguration {
description: string;
reauthUrl: string;
}

interface AuthenticationConfigurationResponse {
data: AuthenticationConfiguration;
success: boolean;
}

export interface SecurityAPIWrapper {
addGroupMembers: (groupId: number, principalIds: number[], projectPath: string) => Promise<AddGroupMembersResponse>;
createApiKey: (type?: string, description?: string) => Promise<string>;
Expand All @@ -78,6 +88,7 @@ export interface SecurityAPIWrapper {
) => Promise<SecurityPolicy>;
fetchRoles: () => Promise<List<SecurityRole>>;
getAuditLogDate: (filterCol: string, filterVal: number | string) => Promise<string>;
getAuthenticationConfiguration: () => Promise<AuthenticationConfiguration>;
getDeletionSummaries: (containerPath?: string) => Promise<Summary[]>;
getGroupMemberships: () => Promise<GroupMembership[]>;
getInheritedContainers: (container: Container) => Promise<string[]>;
Expand Down Expand Up @@ -262,6 +273,14 @@ export class ServerSecurityAPIWrapper implements SecurityAPIWrapper {
return dateRow.formattedValue ?? dateRow.value;
};

getAuthenticationConfiguration = async (): Promise<AuthenticationConfiguration> => {
const { data } = await request<AuthenticationConfigurationResponse>({
url: ActionURL.buildURL('login', 'getAuthenticationConfiguration.api'),
});

return data;
};

getDeletionSummaries = async (containerPath?: string): Promise<Summary[]> => {
const { moduleSummary } = await request<{ moduleSummary: Summary[] }>({
url: ActionURL.buildURL('core', 'getModuleSummary.api', containerPath),
Expand Down Expand Up @@ -443,6 +462,7 @@ export function getSecurityTestAPIWrapper(
fetchPolicy: mockFn(),
fetchRoles: mockFn(),
getAuditLogDate: mockFn(),
getAuthenticationConfiguration: mockFn(),
getDeletionSummaries: mockFn(),
getGroupMemberships: mockFn(),
getPrincipalById: mockFn(),
Expand Down
5 changes: 5 additions & 0 deletions packages/components/src/theme/panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@
margin-top: 3px;
}

// Override the default margin for h* elements within a panel heading
.panel-heading:is(h1, h2, h3, h4, h5, h6) {
margin: 0;
}


// revert panel heading font-size for those within a tabbed-grid-panel
.tabbed-grid-panel .panel-heading {
Expand Down