There are two ways to create an advisor account:
If you already have a user account in the system:
-
Sign in to the application at least once (so your user account exists in the database)
-
Run the script to set your role to advisor:
npx tsx scripts/set-user-role.ts your-email@example.com advisor
-
Sign out and sign back in to refresh your session with the new role
-
Verify you can see the Reviews page in the navigation
If you prefer to update the database directly:
-- Find your user
SELECT id, email, name, role, tenant_id
FROM users
WHERE email = 'your-email@example.com';
-- Update your role to advisor
UPDATE users
SET role = 'advisor'
WHERE email = 'your-email@example.com';
-- Verify the update
SELECT id, email, name, role
FROM users
WHERE email = 'your-email@example.com';- Run
npx prisma studio - Navigate to the
Usermodel - Find your user by email
- Edit the
rolefield and set it to"advisor" - Save
If you want to create a completely new test user:
-
Sign in with a new email address (via Azure AD)
- The user will be automatically created with role
"family_member"
- The user will be automatically created with role
-
Update the role using Method 1 or Method 2 above
After setting your role to advisor:
-
Sign out and sign back in
-
Check the Reviews page - you should see:
- All pending reviews (not just your own)
- Approve/Reject/Request Changes buttons on pending reviews
- Review actions should work
-
Check the Header - you should see the "Reviews" navigation link
- Make sure you've signed in at least once
- Check that your email matches exactly (case-sensitive)
- Verify the user exists:
npx tsx scripts/list-tenants.ts(if it shows users)
- Clear your browser cookies/session
- Try signing out completely and signing back in
- Check the database to verify the role was actually updated
- Verify your role in the database:
SELECT email, role FROM users WHERE email = 'your-email@example.com' - Check that the role is exactly
"advisor"(not"Advisor"or"ADVISOR") - Make sure you're looking at the correct tenant (if multi-tenant)
# Set your role to advisor
npx tsx scripts/set-user-role.ts your-email@example.com advisor
# Set role back to regular user
npx tsx scripts/set-user-role.ts your-email@example.com family_member
# Set role to trustee
npx tsx scripts/set-user-role.ts your-email@example.com trusteefamily_member- Regular user (default)trustee- Trustee roleadvisor- Advisor role (can review content)