Secure client portals: design around ownership, not hidden buttons

Nov 26, 2026 7 mins read

Define what each client and staff role can do, then enforce permissions consistently on the server.

Begin by drawing a small permission matrix. At minimum name the tenant, the resource, and the action: a client may read their own approved reports; assigned staff might upload a new version; a billing contact does not necessarily see a case's private comments. Make choices explicit. A familiar UI and a login screen are not substitutes for ownership checks.

Enforce the matrix at the boundary

Use server-side authorization for each request that lists, reads, changes, exports, or downloads data. In Laravel, a resource policy can hold the decision about actions on a project or file. Resolve the tenant context, check ownership or granted scope, and deny by default. Keep the same policy for browser and API operations; changing the screen must not change the access rule.

Treat private files and invitations as capabilities

Keep private files off public storage routes. An authorized request can stream the file or receive a narrowly scoped temporary URL if suitable for the business. A temporary URL may be shared while valid; decide whether that is acceptable before using it. Expiring invitation tokens need narrow scope and clear revocation behavior. Log administrative permission changes without logging secrets or document content.

Verify the boundaries before inviting real clients

Use two fabricated tenants with separate projects in staging. Test expected access, denied cross-tenant access, switching tenant, expired or revoked grants, and a member removed while logged in. Include asynchronous exports and expired files; authorization at scheduling time may not cover download later. Release only when each allowed and denied scenario behaves as designed, and configure a support process to handle mistaken or outdated access.

Documentation

Planning a similar project? Tell us what you want to improve through Amilma’s contact page.

Created with ❤️ in Bosnia and Herzegovina. By Amilma.

Live Chat Online

Hi there! How can we help you today?

Your experience on this site will be improved by allowing cookies Cookie information
✓