The four roles in an estate agency CRM
An agency has a handful of kinds of people, and the roles follow them. Propily has four agency roles: agency admin, manager, agent and viewer, the last being read-only. A separate platform role exists for our own staff, and an agency cannot assign it.
The four roles are stored as system roles that the permission service refuses to edit or delete, so a mistaken change cannot quietly alter what agent means for every agency. In outline, they differ like this:
- Agency admin: everything in the agency, including team roles, billing, integrations, API keys and deleting records.
- Manager: runs operations. Creates and edits contacts, properties, viewings and deals, publishes properties, exports contact data and sees analytics. Cannot delete contacts or properties, and cannot manage the team, billing or API keys.
- Agent: works the pipeline. Creates and edits contacts, viewings and deals, handles conversations and messages, and reads properties.
- Viewer: read-only across the main areas.
Permission codes: what deals.view and properties.edit mean
Permissions are `resource.action` strings. `deals.view` lets you read deals and the pipeline, `deals.edit` changes them, `contacts.export` exports contact data, `team.edit_roles` changes other people's roles and `settings.billing` manages the subscription. A role is a set of these codes.
The resources cover contacts, properties, viewings, deals, conversations, messages, calendar, availability, analytics, team, settings, AI agents, API keys, compliance, activity logs and maintenance. A seed script defines the base set and later migrations add new ones, for example when the maintenance and keys areas were built.
Not every route is gated by a fine-grained code. Contact, property, deal, viewing and conversation routes use named permissions. Many administrative and finance routes require the agency admin role directly, finance reports have their own check, and routes that change client money records, such as bank matching, are admin only.
How the API checks permissions on every request
The access token identifies the person. It carries no roles or permissions, so changing someone's role never needs a new token. For each request, a FastAPI dependency works out which agency the caller is acting in from their own active membership record, not from anything in the URL or body. It then loads their permissions for that agency and answers 403, naming the missing permission, if the code is absent.
Because the agency id comes from the dependency, services receive it as an argument and filter by it. A caller cannot reach another agency's record by guessing an id. For leads, and for the ids a bank matching request carries, an id outside the caller's scope gets the same 404 as one that does not exist, so the response does not confirm the record is there. The route below is simplified from a real one.
@router.get("/properties/{property_id}")
async def get_property(
property_id: UUID,
current_user: AgencyUser = Depends(require_agency_permission("properties.view")),
db: AsyncSession = Depends(get_db),
):
# agency comes from the caller's membership, never from the request
return await property_service.get(db, current_user.agency_id, property_id)Branch scoping: what an agent sees inside the agency
Roles answer what you may do. Branches answer which records you may do it to, and an agency with several offices needs both. For leads the rule is:
- Admin: every branch.
- Manager: their own branch, plus leads not yet routed to any branch, so a new inbound lead always reaches a person.
- Agent and viewer: their own branch, plus any lead assigned to them.
- Any role the code does not recognise gets the narrowest rule, its own branch, never the whole agency.
How the branch rules are enforced across routes
A lead outside your scope reads as missing. The check is attached once to the router for every route with a contact id in its path, so a route added later cannot forget it. Someone handed live work on a lead can open it to read it and add a note, but only its branch can change it.
The same idea runs through viewings, where an agent sees their own diary and managers and viewers are held to their branch. It also runs through the live availability page: its WebSocket opens only for people holding the availability permission, and each person hears only about properties in branches they can reach.
How quickly a role change takes effect
Resolving permissions is a multi-table lookup that runs on every authenticated request, so each API worker process caches the result per person and agency for 30 seconds. When an admin changes a role or deactivates a member, the service clears that cache entry and the shared Redis keys straight away.
Each worker keeps its own in-memory cache, and the API runs several workers, so a worker that did not handle the change can serve the old permission set until its entry expires. The practical worst case is about 30 seconds. That is the trade-off for fewer database lookups, and it is the number to ask any vendor for: how long after you remove someone does their access actually stop.
The browser is slower than the server. The interface fetches the caller's permission list and caches it for five minutes, so a button can stay visible for up to that long after the server stopped allowing the action. That is safe because the server enforces every action, and the worst outcome is a 403 on a click.
Two guards protect the admin role itself. An agency cannot demote or deactivate its last active admin, and a person who loses the admin role also loses any payout approvals they had given.
The interface hides controls and the server decides
We drive the interface from the same permission codes the server checks, not from role names, because what a role can do depends on what has been granted to it. The viewing assignment control appears only for people holding `viewings.assign`, contact edit actions need `contacts.edit`, and admin-only sections of the sidebar are hidden from everyone else.
A hidden control is not access control. The interface decides what to offer and the server checks every action itself. Mirroring the codes simply means people are not shown a button that would only return a 403.
Where this fits in Propily
How roles and branches map onto your own offices is a setup conversation. The real estate CRM page covers what the product does, and a demo is where your agency, branches and admins are set up for you.
Questions people ask
What is role based access control in a CRM?
Role based access control gives each user a role and each role a set of permissions such as deals.view. The system checks the permission before an action rather than who the person is, so changing what a role can do changes it for everyone who holds it.
What roles should an estate agency CRM have?
At least an administrator, a manager, an agent and a read-only role, with branch scoping so a negotiator in one office does not see another office's leads. Propily has these four agency roles.
How quickly does a role change take effect?
Immediately on the worker that handled the change and within about 30 seconds on the others, because each worker caches permissions for 30 seconds. The web interface can show stale controls for up to five minutes, but the server refuses whatever the new role does not allow.
Can an agent see another branch's leads?
Not under the default rule. Agents and viewers see their own branch's leads plus leads assigned to them, managers also see leads not yet routed to a branch, and admins see every branch.