Add user feature permissions and unified account management
Magent CI/CD / verify (push) Canceled after 1m19s
Magent CI/CD / deploy-prod (push) Canceled after 0s
Magent CI/CD / deploy-beta (push) Canceled after 0s

This commit is contained in:
2026-09-11 12:31:25 +12:00
parent e2be8b3872
commit ec0a866ef3
32 changed files with 650 additions and 214 deletions
+3 -1
View File
@@ -1,5 +1,6 @@
'use client'
import { canAccess, type FeatureAccess } from '../lib/features'
import PageHeading from '../ui/PageHeading'
import MonthlyRecapPreference from './MonthlyRecapPreference'
import NewsletterPreference from './NewsletterPreference'
@@ -9,6 +10,7 @@ import { useRouter } from 'next/navigation'
import { authFetch, clearToken, getApiBase, getToken } from '../lib/auth'
type ProfileInfo = {
features?: FeatureAccess
username: string
email?: string | null
role: string
@@ -199,7 +201,7 @@ export default function ProfilePage() {
</div>
</form>
<div className="account-connected"><span className="account-connection-dot" aria-hidden="true" /><span>{user.auth_provider === 'jellyfin' ? 'Connected with your Grizzlyflix account' : user.auth_provider === 'local' ? 'Signed in with a Magent account' : 'Signed in with your media account'}</span></div>
<MonthlyRecapPreference key={user.email || 'no-email'} />
{canAccess(user, 'stats') && <MonthlyRecapPreference key={user.email || 'no-email'} />}
<NewsletterPreference key={`newsletter-${user.email || 'no-email'}`} />
</section>