Authorization Model
Understanding LinkedRecords' built-in permission system
Overview
LinkedRecords has a unique authorization model where the user who creates data decides who can access it. Instead of centralized access control rules defined in the backend, permissions are expressed as facts in the triplestore.
Core Principle
By default, data you create is private to you. To share data with others, you create facts that grant specific permissions.
Reserved Predicates
All authorization predicates start with $. These are the available predicates:
$isAccountableFor
Indicates ownership and accountability for an attribute. The accountable party is responsible for the storage quota used by the attribute.
When you create an attribute, a $isAccountableFor fact linking you to it is
automatically created. You don't need to add this manually.
Transferring accountability: You can transfer accountability to a group by creating a new $isAccountableFor fact with the group as the subject. Once transferred, you are no longer accountable—the group is. This matters because accountability determines who pays for storage quota. For example, if you're a member of an organization and create documents for it, you likely want the organization to be accountable for the storage costs, not you personally.
You can only transfer accountability to a group you're a member of - not to other users or arbitrary entities. See Accountability Transfer Rules for details.
What is a group? There is no special "group" concept in LinkedRecords. A group is simply an attribute (typically a KeyValue attribute) that you use as a node for memberships. You create an attribute, and then use its ID as the target of $isMemberOf facts. You don't need to tag it with isA or assign any terms - any attribute can serve as a group.
$isMemberOf
Grants membership in a group, inheriting the group's access permissions.
Members can:
- Read and write attributes the group has
$canAccessto - Read attributes the group has
$canReadto - Use subjects the group has
$canRefinepermission for - Use objects the group has
$canReferTopermission for
$isHostOf
Grants host privileges for a group. Hosts can add new members.
Hosts have all member permissions, plus:
- Can add new members to the group (
$isMemberOf) - Can make other users hosts (
$isHostOf) - Can remove members
To create a $isHostOf fact, you must either be accountable for the group or be a host of it.
$canRead
Grants read-only access to an attribute.
$canAccess
Grants read and write access to an attribute.
$canRefine
Grants permission to use an attribute as the subject in facts (conceptor permission).
This allows team members to create facts like [attributeId, 'somePredicate', someOtherAttributeId].
$canReferTo
Grants permission to use an attribute as the object in facts (referrer permission).
This allows team members to create facts like [otherId, 'somePredicate', attributeId].
Permission Hierarchy
Creator Permissions
When you create an attribute, you automatically get full permissions:
- You become accountable for it
- You can read and write it
- You can use it as subject or object in facts
- You can grant permissions to others
Group Permissions
Permissions can be granted to groups (teams), which then flow to all members:
Authorization Rules
Who Can Create Facts?
| Predicate | Who Can Create |
|---|---|
$isATermFor | Anyone (terms are public domain). If a term already exists it will not be created again. |
$isAccountableFor | Auto-created for creator; can transfer to a group you're a member of (not to users directly) |
$isMemberOf | Creator/accountable of the group, or anyone with $isHostOf on the group |
$isHostOf | Creator/accountable of the group, or anyone with $isHostOf on the group |
$canRead | Anyone accountable for the object, or hosts of groups with $canAccess to the object |
$canAccess | Anyone accountable for the object, or hosts of groups with $canAccess to the object |
$canRefine | Anyone accountable for the object, or hosts of groups with $canAccess to the object |
$canReferTo | Anyone accountable for the object, or hosts of groups with $canAccess to the object |
| Custom predicates | Anyone with $canRefine on subject AND $canReferTo on object (includes group members with $canAccess) |
All the above relations are not transitive.
Who Can Delete Facts?
Generally, you can delete facts you created or have appropriate authorization over:
- Term facts can only be deleted by their creator
- Membership facts can be deleted by hosts or the member themselves
- Permission facts can be deleted by the accountable party
Practical Examples
Private Data (Default)
Share with a Specific User
Share with a Team
Revoke Access
Security Considerations
Users Cannot Self-Promote
A user cannot grant themselves permissions they don't have:
Members Cannot Invite Others (Only Hosts)
Being a member doesn't grant invitation rights:
Custom Predicates Cannot Start with $
The $ prefix is reserved for system predicates:
Accountability Transfer Rules
Accountability ($isAccountableFor) has specific transfer rules:
- You can only transfer accountability to a group you're a member of (not to individual users or arbitrary entities)
- Accountability cannot be deleted, only transferred
- You cannot transfer accountability to terms or random strings
Derived Permissions from Group Membership
When a group has $canAccess to an attribute, members of that group inherit implicit permissions:
- Read and write access to the attribute's payload
- Implicit
$canRefine- can use the attribute as subject in custom facts (if group has$canRefine) - Implicit
$canReferTo- can use the attribute as object in custom facts (if group has$canReferTo)
This means that for creating custom predicates, users with $canAccess through group membership effectively have $canRefine and $canReferTo permissions on those attributes.
Verifying Fact Creation
Since unauthorized fact creations are silently ignored, check the return value: