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

feat: add resource-action pills to custom roles table#14354

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 11 commits intomainfromjaaydenh/add-custom-role-pills
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from1 commit
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
PrevPrevious commit
NextNext commit
fix: custom role with no permissions
  • Loading branch information
@jaaydenh
jaaydenh committedSep 3, 2024
commit437bbd0fc326aed51fce206b96d3bbcdbd8a901b
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
import type { Meta, StoryObj } from "@storybook/react";
import { MockRoleWithOrgPermissions } from "testHelpers/entities";
import {
MockRoleWithOrgPermissions,
MockOrganizationAuditorRole,
} from "testHelpers/entities";
import { CustomRolesPageView } from "./CustomRolesPageView";

const meta: Meta<typeof CustomRolesPageView> = {
Expand All@@ -26,6 +29,14 @@ export const Enabled: Story = {
},
};

export const RoleWithoutPermissions: Story = {
args: {
roles: [MockOrganizationAuditorRole],
canAssignOrgRole: true,
isCustomRolesEnabled: true,
},
};

export const EmptyDisplayName: Story = {
args: {
roles: [
Expand All@@ -40,15 +51,15 @@ export const EmptyDisplayName: Story = {
},
};

export constEmptyRoleWithoutPermission: Story = {
export constEmptyTableUserWithoutPermission: Story = {
args: {
roles: [],
canAssignOrgRole: false,
isCustomRolesEnabled: true,
},
};

export constEmptyRoleWithPermission: Story = {
export constEmptyTableUserWithPermission: Story = {
args: {
roles: [],
canAssignOrgRole: true,
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -145,10 +145,14 @@ const RoleRow: FC<RoleRowProps> = ({ role, onDelete, canAssignOrgRole }) => {

<TableCell>
<Stack direction="row" spacing={1}>
<PermissionsPill
resource={resourceTypes[0]}
permissions={role.organization_permissions}
/>
{role.organization_permissions.length > 0 ? (
<PermissionsPill
resource={resourceTypes[0]}
permissions={role.organization_permissions}
/>
) : (
<p>None</p>
)}

{resourceTypes.length > 1 && (
<OverflowPermissionPill
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp