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 components/user/dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function UserDropdown() {
<DropdownMenuItem asChild>
<div className="flex cursor-default items-center gap-2">
<RiUserLine className="h-4 w-4" />
<span>{(userInfo as { account_name?: string })?.account_name ?? (isAdmin ? "rustfsAdmin" : "")}</span>
<span>{(userInfo as { account_name?: string })?.account_name ?? ""}</span>
</div>
</DropdownMenuItem>
{!isAdmin && (
Expand Down
4 changes: 2 additions & 2 deletions hooks/use-permissions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ export function PermissionsProvider({ children }: { children: React.ReactNode })
}, [api, isAuthenticated, hasResolvedAdmin, fetchAdminStatus])

useEffect(() => {
if (api && isAuthenticated && hasResolvedAdmin && !isAdmin && !hasFetchedPolicy && !isLoading) {
if (api && isAuthenticated && hasResolvedAdmin && !hasFetchedPolicy && !isLoading) {
fetchUserPolicy()
}
}, [api, isAuthenticated, hasResolvedAdmin, isAdmin, hasFetchedPolicy, isLoading, fetchUserPolicy])
}, [api, isAuthenticated, hasResolvedAdmin, hasFetchedPolicy, isLoading, fetchUserPolicy])

const canChangePassword = isAdmin || hasPermission(CONSOLE_SCOPES.CONSOLE_ADMIN)

Expand Down
Loading