Bugzilla – Attachment 56996 Details for
Bug 17504
Installer shows PostgreSQL info when wrong DB permissions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17504: Make the installer show the right dmbs help if wrong permissions
Bug-17504-Make-the-installer-show-the-right-dmbs-h.patch (text/plain), 3.00 KB, created by
Jonathan Druart
on 2016-10-31 12:56:10 UTC
(
hide
)
Description:
Bug 17504: Make the installer show the right dmbs help if wrong permissions
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-10-31 12:56:10 UTC
Size:
3.00 KB
patch
obsolete
>From f46fcb61d2f0de0e10784d2aa0e0527643d7ba02 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 26 Oct 2016 11:34:08 -0300 >Subject: [PATCH] Bug 17504: Make the installer show the right dmbs help if > wrong permissions > >This patch changes the installer template for step 2 (DB rights check) >so it correctly displays MySQL-related message. >The previous code was doing the wrong comparisson, thus yielding >PostgreSQL documentation. > >To test: >- Run: > $ sudo koha-mysql kohadev > > DROP DATABASE koha_kohadev ; CREATE DATABASE koha_kohadev; > > REVOKE INSERT ON koha_kohadev.* FROM 'koha_kohadev'@'localhost'; > > FLUSH PRIVILEGES; \q >- Run the webinstaller through step 2 >=> FAIL: You get the message in the attached screenshot >- Apply the patch, reload >=> SUCCESS: You are displayed a different warning message, with a link >to up-to-date MySQL docs on GRANT >- Fix permissions for the user: > $ sudo koha-mysql kohadev > > GRANT ALL PRIVILEGES on koha_kohadev.* TO 'koha_kohadev'@'localhost'; > > FLUSH PRIVILEGES; \q >- Reload >=> SUCCESS: All checks are correct and you can move on >- Sign off :-D > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt >index 4a02f18..d7194b9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt >@@ -20,8 +20,15 @@ > [% IF ( checkgrantaccess ) %] > <p>User <code>[% user %]</code> has all required privileges on database <code>[% dbname %]</code>.</p> > [% ELSE %] >- <p class="error">user <code>[% user %]</code> doesn't have enough privilege on database <code>[% dbname %]</code> </p> >- <p class="tip"> Ask for or make a change in the user's privileges. Need help? See [% IF ( mysql ) %]<a href=http://dev.mysql.com/doc/refman/4.1/en/grant.html>[% ELSE %]http://www.postgresql.org/docs/8.2/interactive/sql-createrole.html[% END %]this page</a>. User <code>[% user %]</code> must have USAGE, INSERT, UPDATE, DELETE, DROP and CREATE privileges on <code>[% dbname %]</code></p> >+ <p class="error">user <code>[% user %]</code> doesn't have enough privilege on database <code>[% dbname %]</code></p> >+ <p class="tip">Ask for or make a change in the user's privileges. Need help? See >+ [% IF dbms == 'mysql' %]<a href="https://dev.mysql.com/doc/refman/5.5/en/grant.html"> >+ [% ELSE %]<a href="http://www.postgresql.org/docs/8.2/interactive/sql-createrole.html"> >+ [% END %]this page</a>. >+ </p> >+ <p class="tip"> >+ User <code>[% user %]</code> must have USAGE, INSERT, UPDATE, DELETE, DROP and CREATE privileges on <code>[% dbname %]</code> >+ </p> > [% END %] > [% ELSE %] > <p class="error">No database named <code>[% dbname %]</code> detected.</p> >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17504
:
56873
|
56875
|
56968
| 56996