fix: check perms to view watchlist slider on user profile (#2980)

pull/2981/head
TheCatLady 2 years ago committed by GitHub
parent 095048d94a
commit 5d73bc2238
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -294,7 +294,13 @@ const UserProfile = () => {
/>
</>
)}
{(!watchlistItems || !!watchlistItems.results.length) && !watchlistError && (
{(user.id === currentUser?.id ||
currentHasPermission(
[Permission.MANAGE_REQUESTS, Permission.WATCHLIST_VIEW],
{ type: 'or' }
)) &&
(!watchlistItems || !!watchlistItems.results.length) &&
!watchlistError && (
<>
<div className="slider-header">
<Link

Loading…
Cancel
Save