Bug 20861: Correct EDI permissions on EDI messsages
authorKatrin Fischer <katrin.fischer.83@web.de>
Sun, 3 Jun 2018 08:09:23 +0000 (10:09 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 7 Jun 2018 08:15:47 +0000 (10:15 +0200)
The permission for EDI is edi_manage, but 2 pages asked
for manage_edi, allowing users not to access those.

To test:
- Add edi_manage to your permissions
- Try to access the EDIFACT messages from the
  acq start page
- Verify it doesn't work
- Apply patch and try again
- You should be able to access the page now
- Try to access the other page directly (if you don't
  have EDI data):
  /cgi-bin/koha/acqui/edimsg.pl
- Verify you can access the page and don't get a
  permission error

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7883b19de5f24551b36bf29133b04bc71ad4d56a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cbeed6cf3db342e025b4d837ab135136d39a140e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

acqui/edifactmsgs.pl
acqui/edimsg.pl

index 608eaff..effa918 100755 (executable)
@@ -32,7 +32,7 @@ my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user(
         query           => $q,
         type            => 'intranet',
         authnotrequired => 0,
-        flagsrequired   => { acquisition => 'manage_edi' },
+        flagsrequired   => { acquisition => 'edi_manage' },
         debug           => 1,
     }
 );
index c3547f0..122b95a 100755 (executable)
@@ -32,7 +32,7 @@ my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user(
         query           => $q,
         type            => 'intranet',
         authnotrequired => 0,
-        flagsrequired   => { acquisition => 'manage_edi' },
+        flagsrequired   => { acquisition => 'edi_manage' },
         debug           => 1,
     }
 );