Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: warn user without permissions to view org members#16721

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jaaydenh merged 1 commit intomainfromjaaydenh/org-members-warning
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes fromall 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
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -72,6 +72,7 @@ const OrganizationMembersPage: FC = () => {
<OrganizationMembersPageView
allAvailableRoles={organizationRolesQuery.data}
canEditMembers={organizationPermissions.editMembers}
canViewMembers={organizationPermissions.viewMembers}
error={
membersQuery.error??
organizationRolesQuery.error??
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -28,6 +28,7 @@ import {
TableRow,
} from "components/Table/Table";
import { UserAutocomplete } from "components/UserAutocomplete/UserAutocomplete";
import { TriangleAlert } from "lucide-react";
import { UserGroupsCell } from "pages/UsersPage/UsersTable/UserGroupsCell";
import { type FC, useState } from "react";
import { TableColumnHelpTooltip } from "./UserTable/TableColumnHelpTooltip";
Expand All@@ -36,6 +37,7 @@ import { UserRoleCell } from "./UserTable/UserRoleCell";
interface OrganizationMembersPageViewProps {
allAvailableRoles: readonly SlimRole[] | undefined;
canEditMembers: boolean;
canViewMembers: boolean;
error: unknown;
isAddingMember: boolean;
isUpdatingMemberRoles: boolean;
Expand All@@ -58,6 +60,7 @@ export const OrganizationMembersPageView: FC<
> = ({
allAvailableRoles,
canEditMembers,
canViewMembers,
error,
isAddingMember,
isUpdatingMemberRoles,
Expand All@@ -70,7 +73,7 @@ export const OrganizationMembersPageView: FC<
return (
<div>
<SettingsHeader title="Members" />
<Stack>
<div className="flex flex-col gap-4">
{Boolean(error) && <ErrorAlert error={error} />}

{canEditMembers && (
Expand All@@ -80,6 +83,15 @@ export const OrganizationMembersPageView: FC<
/>
)}

{!canViewMembers && (
<div className="flex flex-row text-content-warning gap-2 items-center text-sm font-medium">
<TriangleAlert className="size-icon-sm" />
<p>
You do not have permission to view members other than yourself.
</p>
</div>
)}

<Table>
<TableHeader>
<TableRow>
Expand DownExpand Up@@ -154,7 +166,7 @@ export const OrganizationMembersPageView: FC<
))}
</TableBody>
</Table>
</Stack>
</div>
</div>
);
};
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp