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

Admin may manage Client, Workspace, and People data #104

Merged

Conversation

zspencer
Copy link
Member

@zspencer zspencer commented Aug 22, 2020

See: #103

This is a very rough draft, and is only intended to give us a baseline
to start with so I stop going into heroku rails console to manage rooms
and such.

  • Make sure we explode horribly if ENV[‘ADMIN_USERNAME’] and ENV[‘ADMIN_PASSWORD’] are not set.

@zspencer zspencer requested a review from user512 August 22, 2020 20:21
@zspencer zspencer marked this pull request as draft August 22, 2020 20:21
@user512 user512 temporarily deployed to convene-pr-104 August 22, 2020 20:21 Inactive
@zspencer zspencer temporarily deployed to convene-pr-104 August 22, 2020 23:13 Inactive
},
"ADMIN_PASSWORD": {
"description": "Password to access the admin panel",
"generator": "secret"
Copy link
Contributor

Choose a reason for hiding this comment

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

Didn't know about generator, pretty convenient.

environment:
POSTGRES_PASSWORD: password
ports:
- 5432:5432
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this docker file for?

Copy link
Member Author

Choose a reason for hiding this comment

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

Accidentally committed it. One of my computers does not have postgresql-server installed; so the docker-compose.yml file allows me to spin up the service-level dependencies without installing postgresql.

Probably needs it's own PR with documentation updates as well.

# you're free to overwrite the RESTful controller actions.
module Admin
class ApplicationController < Administrate::ApplicationController
extend Configuration::Configurable
Copy link
Contributor

Choose a reason for hiding this comment

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

Saw this on review app: Unable to load application: NameError: uninitialized constant ActiveSupport::Configurable::Configuration::Configurable, possible name collision with Rails?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you need to require 'admin/configuration', lib isn't in auto load.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you! I was doing this on my ipad, which does not (yet) let me view the Heroku logs so I couldn't figure out why the build was failing!

@zspencer zspencer force-pushed the zspencer/install-administrate-for-client-management branch from 57c9fbd to f810951 Compare August 23, 2020 21:25
@zspencer zspencer temporarily deployed to convene-pr-104 August 23, 2020 21:25 Inactive
@zspencer zspencer force-pushed the zspencer/install-administrate-for-client-management branch from f810951 to 7071d3d Compare August 23, 2020 21:43
@zspencer zspencer temporarily deployed to convene-pr-104 August 23, 2020 21:43 Inactive
@zspencer zspencer force-pushed the zspencer/install-administrate-for-client-management branch from 7071d3d to 655f38d Compare August 23, 2020 21:47
@zspencer zspencer temporarily deployed to convene-pr-104 August 23, 2020 21:47 Inactive
@zspencer zspencer force-pushed the zspencer/install-administrate-for-client-management branch from 655f38d to 151b346 Compare August 23, 2020 21:48
@zspencer zspencer temporarily deployed to convene-pr-104 August 23, 2020 21:48 Inactive
@zspencer zspencer force-pushed the zspencer/install-administrate-for-client-management branch from 151b346 to 311a843 Compare August 23, 2020 21:50
@zspencer zspencer requested a review from user512 August 23, 2020 21:50
@zspencer zspencer temporarily deployed to convene-pr-104 August 23, 2020 21:50 Inactive
@zspencer zspencer marked this pull request as ready for review August 23, 2020 21:50
@zspencer zspencer force-pushed the zspencer/install-administrate-for-client-management branch from 311a843 to 65545fe Compare August 23, 2020 22:05
@zspencer zspencer temporarily deployed to convene-pr-104 August 23, 2020 22:05 Inactive
See: #103

This is a very rough draft, and is only intended to give us a baseline
to start with so I stop going into heroku rails console to manage rooms
and such.
I worry about `ENV` variables leaking everywhere, so I'm prematurely
sprouting a Configuration class in the Admin namespace so that there is
a single-ish place where `ENV` variables are consumed.

This also sprouts `app/lib` to hold non-pattern-focused objects in an auto-loadable area.

See: https://guides.rubyonrails.org/autoloading_and_reloading_constants.html#autoload-paths
@zspencer zspencer force-pushed the zspencer/install-administrate-for-client-management branch from 65545fe to 43ce625 Compare August 24, 2020 16:49
@zspencer zspencer temporarily deployed to convene-pr-104 August 24, 2020 16:49 Inactive
@user512
Copy link
Contributor

user512 commented Aug 24, 2020

Looks great and tested on review app.
Able to create resources but likely need more config changes to make it play nice with uuid.

Because some of our models use friendly slugs and some do not, I
overrode the scoped_resources method to take that into account.

I also did some re-arranging of the data on the Workspace and Client
dashboards to make them a bit more user-friendly
@zspencer zspencer temporarily deployed to convene-pr-104 August 24, 2020 17:19 Inactive
@zspencer zspencer force-pushed the zspencer/install-administrate-for-client-management branch from 98bcea9 to 18b07ef Compare August 24, 2020 17:19
@zspencer zspencer temporarily deployed to convene-pr-104 August 24, 2020 17:19 Inactive
@zspencer
Copy link
Member Author

zspencer commented Aug 24, 2020

Yeaaaaaa, turns out I had overlooked some of the stuff regarding linking. I've fixed that, and also did some cleanup of the dashboards.

Thanks! Going to merge when tests pass!

@zspencer zspencer merged commit bb28d09 into development Aug 24, 2020
@zspencer zspencer deleted the zspencer/install-administrate-for-client-management branch August 24, 2020 17:32
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