-
Notifications
You must be signed in to change notification settings - Fork 231
chore(preferences): add readWrite preference that disables some admin features in compass COMPASS-9001 #7354
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
base: main
Are you sure you want to change the base?
Conversation
684eef0
to
afb58a9
Compare
… features in compass
afb58a9
to
293a44c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll open a ticket to do something about this code, the logic there is minimal and yet we're spreading it across three different files passing down these variables from method to method, it's really hard to navigate this stuff for no good reason
import { InMemoryStorage } from './preferences-in-memory-storage'; | ||
import { getActiveUser } from './utils'; | ||
|
||
const editablePreferences: (keyof UserPreferences)[] = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I think the intention here was good, on practice this doesn't protect us more from someone trying to change this internal state while making e2e testing and dynamically changing these in sandbox more confusing than it should be: often you can see e2e tests for web being skipped for no good reason even though they can be enabled as people don't know where to look for this and so postponing important part of the development process for way too late in the project time. So I'm erring on the side of making the DX better here and removing the checks (and the env var that gates the logic only to e2e tests)
…ght when readWrite / readOnly is true
should this be a fix? just for the sake of bumping out a patch |
Adds a new preference that maps to data explorer data access read write and disables a few features in compass that won't work with this preference. As the ticket says, we're probably missing a few, but the goal is to hide the most prominent ones that won't work at all, in particular indexes editing and collection renaming