Hi everyone! Is it possible to prevent any delete ...
# ask-community
g
Hi everyone! Is it possible to prevent any delete through web ui and let it enabled from cli?
d
cloud or self hosted?
g
self-hosted
d
Maybe you could try create a new user with no delete permissions on the main tables and use that database user while connecting
For the API and UI , use user with no delete permission. For CLI use another user with all permission
g
mmm you suggest to set environments variables when executing cli commands
Copy code
PREFECT_API_DATABASE_PASSWORD: ********
PREFECT_API_DATABASE_CONNECTION_URL
with different values used to spin up Orion
seems a bit of a workaround
d
or create profiles
g
how do you create profiles?
d
try `pefect --help``
prefect*
g
seems interesting feature, thanks!
d
if its just local server, id just create a .sh file with 2 configs and use that sh file to spin up the server
g
you mean using env vars right?
d
yes
g
if prefect profile command is used, this creates profiles in the database, right?
d
no
g
config files? like yml?
d
it creates the profiles in ~/.prefect
g
ok, good
d
dont believe me blindly though. 😄
👍 1
g
one last question, do you know what are the priorities? env vars if a profile is not specified?
d
unsure
g
ok ok, I will investigate, thanks!
by the way, you were right