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

add a Mojo DBViewer app, useful for development #55

Closed
bschmalhofer opened this issue May 29, 2020 · 2 comments
Closed

add a Mojo DBViewer app, useful for development #55

bschmalhofer opened this issue May 29, 2020 · 2 comments
Milestone

Comments

@bschmalhofer
Copy link
Contributor

bschmalhofer commented May 29, 2020

For development it would be nice to have a little viewer of the database, e.g. Mojolicious::Plugin::DBViewer. This could be added to otobo.psgi or run in a separate container.

See https://stefanorodighiero.net/writings/perl/composing-multiple-mojolicious-apps-with-plack.html and https://metacpan.org/pod/Mojolicious::Plugin::DBViewer

bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue May 30, 2020
bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue May 30, 2020
Generated with: mojo generate lite_app dbviewer.pl
bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue May 30, 2020
Just like in bin/cgi-bin/index.pl
bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue May 30, 2020
Also remove the not needed stuff in __DATA__.
bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue May 30, 2020
Ignore exceptions from plugin, e.g. when the connect is not possible.
bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue May 30, 2020
bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue May 30, 2020
As Plack::Middleware::Auth::Basic asked for a password.
Also fix a broken string terminator: ' => "
bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue May 30, 2020
bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue May 30, 2020
no check yet whether the user is an admin
@bschmalhofer
Copy link
Contributor Author

TODO: limit access to admins

@bschmalhofer bschmalhofer changed the title Docker: for development add a little DBViewer app add a Mojo DBViewer app, useful for development May 30, 2020
bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue May 31, 2020
bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue May 31, 2020
The globe wasn't displayed correctly in Firefox
bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue May 31, 2020
Won't work because the cookie is in a different path.
bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue May 31, 2020
Because the cookie has the path /otobo
bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue Jun 2, 2020
…R_AGENT.

As they are used in the AuthSesssion modules
bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue Jun 2, 2020
The DBViewer is now at /otobo/dbviewer instead of /dbviewer.
bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue Jun 2, 2020
bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue Jun 2, 2020
Avoiding the warning is OK, as secrets are not used in dbviewer.
Add the config file dbviewer.conf that only contains a dummy secret.
bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue Jun 2, 2020
bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue Jun 2, 2020
bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue Jun 2, 2020
Not really helpful as the joined data is not displayed.
bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue Jun 2, 2020
lc has apparently higher priority than ||
bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue Jun 2, 2020
bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue Jun 3, 2020
Does not work yet, as the RequesteURL only supports the query string.
No redirects outside of index.pl are supported.
svenoe added a commit that referenced this issue Jun 3, 2020
Issue #55: add a redirect to the login page when access denied
@bschmalhofer
Copy link
Contributor Author

localhost:5000/otobo/dbviewer/dbviewer/ seems to be working in the Docker use case.
Authorisation is checked via the OTOBO session. The logged in user must be in the group 'admin'. There is no redirect to a login page when access is denied. That is not an essential feature.

@bschmalhofer bschmalhofer added this to the OTOBO 10.0 milestone Jul 22, 2020
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

1 participant