Item9552: Is not posible to edit the persmissions table usign the %WEBPERMISSIONS% with shorter ruls in the http server configuration

pencil
Priority: Normal
Current State: New
Released In:
Target Release: n/a
Applies To: Extension
Component: WebPermissionsPlugin
Branches:
Reported By: JuanPabloGaviria
Waiting For:
Last Change By: JuanPabloGaviria
Hi,

I just installed a new foswiki-1.0.9(2 hours ago) in my local pc for make some test, My first test was to tryout the WebPermissionsPlugin. So i installed the plugn thought the configure utility(i think this plugin version info 7708 (2010-06-09)).

I actived the plugin in the configure, and then i created a topic in sandbox to test it.

I wrote in the topic text:

%WEBPERMISSIONS%

afert i saved the topic the permissions table appers, and show me the view and the edit permissions. But when i click the "edit" buton, nothings happend, the action only redirectme to the sametopic but with the anchor #webpermissions_matrix.

So, i check the open task and no task like this one. then i check the code and i solve the first problem.

I just change the method of the action form, from POST, to GET, and the edit buton works fine:

--- Core.pm.org   2010-08-24 23:46:10.000000000 -0500
+++ Core.pm   2010-08-24 23:46:39.000000000 -0500
@@ -192,7 +192,7 @@ sub WEBPERMISSIONS {
             $tab .= "Cannot edit: $reason";
         }
     }
-    my $page = CGI::start_form( -method => 'POST', -action => $action );
+    my $page = CGI::start_form( -method => 'GET', -action => $action );
     # Anchor for jumping back to
     $page .= CGI::a( { name => 'webpermissions_matrix' } );
     # Note: use CGI::input rather than CGI::hidden below because CGI::hidden

But the SAVE action of the permissions table stop working because of the get method. then i try tampering the post, and i found that the form that is rendered by the plugin, render with action="http://localhost/foswiki/bin/view/Sandbox/TestTopic0" and my httpd-foswiki.conf redirect that request(.../bin/view/... to .../... ) to http://localhost/foswiki/Sandbox/TestTopic0 and the first POST the became(302) a GET to the new url and no input pass to the plugin to render the edit permissions table. I make the change(form: foswiki/bin/view/Sandbox/TestTopic0 to: foswiki/Sandbox/TestTopic0) with firebug and everything works.

i think the issue is in the line 47:
    my $action  = $query->param('web_permissions_action') || 'Display';
    my $editing = $action eq 'Edit';

I add a debug line:

    my $action  = $query->param('web_permissions_action') || 'Display';
    my $editing = $action eq 'Edit';
    Foswiki::Func::writeDebug("the action is: $action");

And allways return "Display"(the default value for the web_permissions_action parameter).

I'm going to try to fix it, but please if you know how to solve this post it.

-- JuanPabloGaviria - 25 Aug 2010

 

ItemTemplate edit

Summary Is not posible to edit the persmissions table usign the %WEBPERMISSIONS% with shorter ruls in the http server configuration
ReportedBy JuanPabloGaviria
Codebase 1.0.9
SVN Range
AppliesTo Extension
Component WebPermissionsPlugin
Priority Normal
CurrentState New
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn
Topic revision: r2 - 25 Aug 2010, JuanPabloGaviria - This page was cached on 17 Jan 2021 - 20:40.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy