Skip to content

Conversation

@nunogois
Copy link
Member

https://linear.app/unleash/issue/2-4100/create-reader-project-role

Adds a new Reader predefined project role.

We will need this to solve the issue where read only users should have explicit read only access to private projects, since in order to have access to private projects, you need a project role. Reader is a role with no permissions, so it still matches our RO business rules and allow you to qualify as a RO user, while allowing you to add that user to private projects.

Since we had a unique constraint on the role name, and it's possible that customer instances have a custom role called "Reader", I dropped that unique constraint and instead added a unique constraint on name + type. That way you only need to have unique names if they have the same type.

image image

@vercel
Copy link

vercel bot commented Dec 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
unleash-docs Ignored Ignored Preview Dec 19, 2025 2:47pm

@github-actions
Copy link
Contributor

github-actions bot commented Dec 18, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions
Copy link
Contributor

API Changelog 7.4.0 vs. 7.4.0

GET /api/admin/projects/{projectId}/context

  • endpoint added

POST /api/admin/projects/{projectId}/context

  • endpoint added

POST /api/admin/projects/{projectId}/context/validate

  • endpoint added

DELETE /api/admin/projects/{projectId}/context/{contextField}

  • endpoint added

GET /api/admin/projects/{projectId}/context/{contextField}

  • endpoint added

PUT /api/admin/projects/{projectId}/context/{contextField}

  • endpoint added

POST /api/admin/projects/{projectId}/context/{contextField}/legal-values

  • endpoint added

DELETE /api/admin/projects/{projectId}/context/{contextField}/legal-values/{legalValue}

  • endpoint added

GET /api/admin/projects/{projectId}/context/{contextField}/strategies

  • endpoint added

POST /api/admin/user-admin

PUT /api/admin/user-admin/{id}

VIEWER = 'Viewer',
OWNER = 'Owner',
MEMBER = 'Member',
READER = 'Reader',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you relaxed the constraint, can't you use "Viewer"? I'm ok with reader as well, just asking

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can, but it felt like we should use a unique name if possible just to prevent confusion between predefined root and project roles.

INSERT INTO roles (name, description, type)
VALUES ('Reader', 'Users with the project reader role have read-only access to the project and cannot make changes.', 'project')
ON CONFLICT (name, type) DO NOTHING;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the migration fail on conflict? Otherwise, we may end up in an invalid state

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My reasoning is that, if the role is already there, we don't really care and should proceed.

@chriswk chriswk moved this from New to In Progress in Issues and PRs Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants