You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #254 added a real useUserRole() hook at hooks/use-user-role.ts that returns "sponsor" | "contributor" | undefined from the session. The env var bypasses this entirely, and the console.warn block at lines 36-43 even acknowledges the env var is a dev shim that should not be enabled in production.
What to do
Remove the IS_MAINTAINER env-based constant and the console.warn block
components/bounty/bounty-sidebar.tsx:32gates maintainer-only UI on theNEXT_PUBLIC_MOCK_MAINTAINERenv var:PR #254 added a real
useUserRole()hook athooks/use-user-role.tsthat returns"sponsor" | "contributor" | undefinedfrom the session. The env var bypasses this entirely, and theconsole.warnblock at lines 36-43 even acknowledges the env var is a dev shim that should not be enabled in production.What to do
IS_MAINTAINERenv-based constant and theconsole.warnblockuseUserRolefrom@/hooks/use-user-roleIS_MAINTAINERreferences with the role check that matches the maintainer-gated UI (likelyrole === "sponsor"based on the PR Add sponsor role feature - gate Create access to sponsors #254 contract)Acceptance criteria
NEXT_PUBLIC_MOCK_MAINTAINERremains inbounty-sidebar.tsxconsole.warnblock removedFiles
components/bounty/bounty-sidebar.tsxhooks/use-user-role.ts(reference)