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

How do I connect this to my website? #376

Closed
Dragon-Of-Dojima opened this issue Aug 20, 2019 · 1 comment
Closed

How do I connect this to my website? #376

Dragon-Of-Dojima opened this issue Aug 20, 2019 · 1 comment

Comments

@Dragon-Of-Dojima
Copy link

I want to use Wasabi to have an admin test things such as captions, pictures, etc. to a small news-like site I run. I have Wasabi running on my virtual box, and can access the Wasabi UI from localhost. However, I need the admin I'm gonna have use it be able to go to wasabi(or something).mywebsite.com, and only the admin to be able to change portions of mywebsite.com using Wasabi as the testing framework.

How would I go about doing this? Which files would I start at?

@shoeffner
Copy link
Member

This is a very old project, so I am not sure if you will still be able to get everything properly setup.

You need to put the modules/ui/dist directory (after a successful grunt build) to your domain (remember to change

{
    supportEmail: 'you@example.com',
    apiHostBaseUrlValue: 'http://localhost:8080/api/v1'
}

as mentioned in modules/ui/README.md).
There is a problem with CORS when I try to run everything locally, so I need to be vigilant about the URLs (localhost works, 127.0.0.1 does not, I haven't digged deeper) – I am not exactly sure where to change that for a production system anymore.

To change the superadmin (admin/admin), make sure that you should change the migration files in
wasabi/modules/repository-datastax/src/main/resources/com/intuit/wasabi/repository/impl/cassandra/migration/V026__Insert_superadmins.cql or add a new one which deletes the admin/admin login and creates a new one, e.g.
wasabi/modules/repository-datastax/src/main/resources/com/intuit/wasabi/repository/impl/cassandra/migration/V037__change_superadmin.cql

DELETE FROM user_roles WHERE user_id='admin';
DELETE FROM app_roles WHERE user_id='admin';
DELETE FROM superadmins WHERE user_id='admin';
insert into user_roles (user_id, app_name, role) VALUES ('andrewtBST','*','superadmin');
insert into app_roles (app_name, user_id, role) VALUES ( '*','andrewtBST','superadmin');
INSERT INTO superadmins (user_id) VALUES ('andrewtBST');

I haven't tested this, but that should roughly be what you need to do. Maybe you need to look up the deletion syntax for CQL. Also I don't remember where/how to set the password... maybe it's admin by default as well, you can try it out.

Apart from that, everything else is pretty much server configurations: getting the URLs to point to wasabi and the UI, etc.

Once you done that, you can create experiments and use them as shown inside the contrib/client-demo example project.

Good luck!

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

No branches or pull requests

2 participants