From f16f70d881bd2b715e4a98510fb884fab4babf81 Mon Sep 17 00:00:00 2001 From: Jaayden Halko Date: Mon, 3 Mar 2025 23:44:15 +0000 Subject: [PATCH] chore: warn user without permissions to view org members (#16721) resolves coder/internal#392 In situations where a user accesses the org members without any permissions beyond that of a normal member, they will only be able to see themselves in the list of members. This PR shows a warning to users who arrive at the members page in this situation. Screenshot 2025-02-26 at 18 36 59 --- .../OrganizationMembersPage.tsx | 1 + .../OrganizationMembersPageView.tsx | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/site/src/pages/OrganizationSettingsPage/OrganizationMembersPage.tsx b/site/src/pages/OrganizationSettingsPage/OrganizationMembersPage.tsx index 078ae1a0cbba8..7ae0eb72bec91 100644 --- a/site/src/pages/OrganizationSettingsPage/OrganizationMembersPage.tsx +++ b/site/src/pages/OrganizationSettingsPage/OrganizationMembersPage.tsx @@ -72,6 +72,7 @@ const OrganizationMembersPage: FC = () => { = ({ allAvailableRoles, canEditMembers, + canViewMembers, error, isAddingMember, isUpdatingMemberRoles, @@ -70,7 +73,7 @@ export const OrganizationMembersPageView: FC< return (
- +
{Boolean(error) && } {canEditMembers && ( @@ -80,6 +83,15 @@ export const OrganizationMembersPageView: FC< /> )} + {!canViewMembers && ( +
+ +

+ You do not have permission to view members other than yourself. +

+
+ )} + @@ -154,7 +166,7 @@ export const OrganizationMembersPageView: FC< ))}
- +
); }; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy