Skip to content
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
2 changes: 1 addition & 1 deletion src/library-authoring/LibraryAuthoringPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ describe('<LibraryAuthoringPage />', () => {

it('should show Library Team button in Library Info that opens the Library Team modal', async () => {
await renderLibraryPage();
const manageAccess = await screen.findByRole('button', { name: /Library Team/i });
const manageAccess = await screen.findByRole('button', { name: /Manage Access/i });

expect(manageAccess).not.toBeDisabled();
fireEvent.click(manageAccess);
Expand Down
4 changes: 2 additions & 2 deletions src/library-authoring/library-info/LibraryInfo.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,9 @@ describe('<LibraryInfo />', () => {
const ADMIN_CONSOLE_URL = 'http://localhost:2025/admin-console';
mergeConfig({ ADMIN_CONSOLE_URL });
render();
const manageTeam = await screen.findByText('Library Team');
const manageTeam = await screen.findByText('Manage Access');
expect(manageTeam).toBeInTheDocument();
expect(manageTeam).toHaveAttribute('href', `${ADMIN_CONSOLE_URL}/authz/libraries/${libraryData.id}`);
expect(manageTeam).toHaveAttribute('href', `${ADMIN_CONSOLE_URL}/authz?scope=${libraryData.id}`);
});

it('renders settings section title', () => {
Expand Down
21 changes: 11 additions & 10 deletions src/library-authoring/library-info/LibraryInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ const LibraryInfo = () => {
libraryId={libraryId}
canEditToggle={(!isLoadingUserPermissions && userPermissions?.canManageTeam) || false}
/>
{shouldShowAdminConsoleLink && (
<Button
as={Hyperlink}
variant="outline-primary"
className="my-3"
destination={`${adminConsoleUrl}/authz?scope=${libraryId}`}
target="_blank"
>
{intl.formatMessage(messages.libraryTeamButtonTitle)}
</Button>
)}
<span className="font-weight-bold">
{intl.formatMessage(messages.organizationSectionTitle)}
</span>
Expand All @@ -55,16 +66,6 @@ const LibraryInfo = () => {
{intl.formatMessage(messages.libraryTeamButtonTitle)}
</Button>
)}
{shouldShowAdminConsoleLink && (
<Button
as={Hyperlink}
variant="outline-primary"
destination={`${adminConsoleUrl}/authz/libraries/${libraryId}`}
target="_blank"
>
{intl.formatMessage(messages.libraryTeamButtonTitle)}
</Button>
)}
</Stack>
<Stack gap={3}>
<span className="font-weight-bold">
Expand Down
2 changes: 1 addition & 1 deletion src/library-authoring/library-info/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const messages = defineMessages({
},
libraryTeamButtonTitle: {
id: 'course-authoring.library-authoring.sidebar.info.library-team.button.title',
defaultMessage: 'Library Team',
defaultMessage: 'Manage Access',
description: 'Title to use for the button that allows viewing/editing the Library Team user access.',
},
libraryHistorySectionTitle: {
Expand Down