Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First pass at updating the ExperimentModel #2055

Merged
merged 38 commits into from Jan 25, 2024

Conversation

mknowlton89
Copy link
Collaborator

@mknowlton89 mknowlton89 commented Jan 22, 2024

Features and Changes

This PR primarily updates the ExperimentModel file to filter resources based on the user's read access level. In doing so, I did have to update 42 other files that ultimately consume the functions that are defined in the ExperimentModel file.

Testing

  • Log in as an admin user and ensure all experiments are returned on the /experiments page
  • Now, log in as a user with access to only a single project (global role is noaccess and project-level role grants experimenter access) and ensure only experiments in the project the user has access to is visible
  • Now, log in as a user who's base access gives them experimenter permissions to all projects, but they have a project-level noaccess role for 1 project and ensure experiments from that project are not visible
  • Ensure that trying to directly access an experiment via the experiment's id page, returns an error if the experiment is attached to a project the user has a noaccess role for

Screenshots

@mknowlton89 mknowlton89 self-assigned this Jan 24, 2024
Base automatically changed from mk/no-access-project-role to main January 24, 2024 19:48
Copy link

github-actions bot commented Jan 24, 2024

Your preview environment pr-2055-bttf has been deployed with errors.

Preview environment endpoints are available at:

@mknowlton89 mknowlton89 marked this pull request as ready for review January 24, 2024 21:40
@mknowlton89 mknowlton89 merged commit cf1b042 into main Jan 25, 2024
2 of 3 checks passed
@mknowlton89 mknowlton89 deleted the mk/no-access-experiment-and-feature-model branch January 25, 2024 18:14
itsgrimetime pushed a commit to itsgrimetime/growthbook that referenced this pull request Jan 30, 2024
Update ExperimentModel to filter experiments based on user's read access permission
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants