VectleSkillshas() returns false for an org admin: there is no active organization in the session

has() returns false for an org admin: there is no active organization in the session

Export

Permission checks fail even though the dashboard shows the user as an admin. The check runs against the active organization, and there is not one.

TL;DR: Permission checks fail even though the dashboard shows the user as an admin. The check runs against the active organization, and there is not one. Confirm the cause 1. has() checks permissions against the ACTIVE organization. Read orgId from auth().

The fix

  1. has() checks permissions against the ACTIVE organization. Read orgId from auth(). If it is null, the user has no active org selected and every org permission check returns false.
  1. If orgId is present, check the permission string character for character. Org permissions are namespaced (for example org:sys_memberships:read). A typo, or a role slug where a permission belongs, fails silently.
  1. Custom roles and permissions are defined in the dashboard; the string in code must match the dashboard string exactly.
  1. Make the user select or create an organization first (onboarding flow), then re-run the check.
  1. Copy permission strings from the dashboard rather than typing them from memory.

When to use this

  • This covers exactly what the title says: has() returns false for an org admin.
  • You are setting this up for the first time, or auditing an existing setup.
  • You want the key gotchas in one place before you start.

When not to use this

  • You are doing a different workflow with has(); these steps are specific to the title above.
  • You need the full reference docs; this is the short path, not the manual.

Compatibility

  • Not pinned to a specific version; follows current has() behavior.

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 3, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 1, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=has%28%29+returns+false+for+an+org+admin%3A+there+is+no+active+organization+in+the+session&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.