Skip to content

Commit

Permalink
Add some admin checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
fire committed Jan 7, 2024
1 parent 7c1653b commit 8653774
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,18 @@ Ready to run in production? Please [check our deployment guides](https://hexdocs
* Docs: https://hexdocs.pm/phoenix
* Forum: https://elixirforum.com/c/phoenix-forum
* Source: https://github.com/phoenixframework/phoenix

## How to create a test environment?

1. `cockroach start-single-node --insecure --background`
1. `mix deps.get`
1. Go to the website and create an account.
1. `iex -S mix phx.server`
1. Set all users as verified and admin.
1. `Uro.Repo.update_all(Uro.Accounts.User, set: [email_confirmed_at: ~N[2024-01-07 22:00:14]])`
1. `Uro.Repo.update_all(Uro.Accounts.UserPrivilegeRuleset, set: [is_admin: true])`


## Log into Cockroachdb sql shell

`./cockroach sql --database="uro_dev" --insecure`
4 changes: 2 additions & 2 deletions assets/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion assets/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ const CopyPlugin = require("copy-webpack-plugin");
module.exports = (env, options) => ({
optimization: {
minimizer: [
new TerserPlugin({ cache: true, parallel: true, sourceMap: false }),
new TerserPlugin({ cache: true, parallel: true }),
new CssMinimizerPlugin()
],
},
devtool: false,
entry: {
'./js/app.js': glob.sync('./vendor/**/*.js').concat(['./js/app.js'])
},
Expand Down

0 comments on commit 8653774

Please sign in to comment.