Area: UI
Sub-Area: Permissions & Access Control
Applies to: Cloud
Issue
A user can see the "Add Note" button but can't create a note. When they submit the note, they get this error:
"Unauthorized to create posts. Please contact your DataHub administrator if this needs corrective action."
You Might Be Asking
- What privilege do I need to add a note to an asset?
- Why can I see "Add Note" but get an error when I submit?
- Is the privilege for notes the same as the one for home page posts?
- How do I let users add notes without giving them a broad platform privilege?
Cause
The "Add Note" button is shown by default. DataHub checks the permission when you submit the note, not when the button appears.
On DataHub Cloud, a note on an asset is allowed if the user has any one of these:
- Manage Entity Posts (
MANAGE_ENTITY_POSTS) on the asset - Edit Entity (
EDIT_ENTITY) on the asset - Create Global Announcements (
CREATE_GLOBAL_ANNOUNCEMENTS) - Manage Home Page Posts (
MANAGE_GLOBAL_ANNOUNCEMENTS)
"Manage Home Page Posts" is the UI name of MANAGE_GLOBAL_ANNOUNCEMENTS. DataHub accepts it and Create Global Announcements as equal for this check. Home page posts need one of those two privileges. Manage Home Page Posts is described as "Create and delete home page posts", so it is not a notes-only grant.
A user who has none of these gets the error above. Roles and groups matter here: group members inherit the role assigned to their group.
By default on Cloud:
- The Editor role's policy "Editors - Edit Metadata Entities" grants Edit Entity on datasets, charts, dashboards and other asset types.
- The default policy
urn:li:dataHubPolicy:editor-metadata-policygrants Manage Entity Posts to the Editor role. - The Asset Owners policy grants asset owners Edit Entity and Manage Entity Posts. When a group owns an asset, every member of the group counts as an owner.
Solution
Pick the option that fits.
Option 1: Assign the Editor role. Use this for users who need broad editing rights.
- Go to Settings > Users & Groups > Users.
- On the user's row, pick Editor in the role drop-down.
You can also go to Settings > Permissions > Roles and click Add Users next to a role. To change a role, you must be an Admin or hold the Manage Policies privilege. See Roles.
Option 2: Create a scoped policy. Use this to grant notes without wider edit rights.
- Go to Settings > Permissions > Policies.
- Click Create new policy.
- Add the Manage Entity Posts privilege.
- Set the users or groups that need it, and limit the policy to the assets you choose.
- Save the policy.
Saving, deleting or deactivating a policy may take up to 2 minutes to be reflected. See the Access Policies Guide.
Permissions are additive. A new policy only adds to what a user can do.
Check a user who should already have access:
- Confirm the user is a member of the group.
- Confirm the group has a role or a policy that grants one of the privileges above.
- Confirm the policy applies to the asset in question.