Tags:
create new tag
, view all tags

Problem

When a user doesn't have read access to a page, they are sent to a generic error page. There is no way to inform them on a per-web basis of the right person to contact for gaining access to that page.

Proposal

Add a WebPreferences variable (say WEBVIEWACCESSERROR) that specifies which page should be shown when a user doesn't have access to view a page. That page could describe who is allowed to see the page and who to contact to gain access.

I've modified bin/viewauth as follows:

      if( ! $viewAccessOK ) {
          my $url = &TWiki::getOopsUrl( $webName, $topic, "oopsaccessview" );
+         my $errorTopic = TWiki::Prefs::getPreferencesValue( "WEBVIEWACCESSERROR", $webName ) || "";
+         if ($errorTopic ne "") {
+           my ($errweb, $errtopic) = split(/\./, $errorTopic);
+           if ($errtopic ne "" && $errweb ne $webName) {
+             $url = &TWiki::getViewUrl( $errweb, $errtopic );
+           }
+         }
        TWiki::redirect( $query, $url );
        return;
    }

Obviously this could be extended to handle write access errors as well, but we were having problems mostly with reads. This allows different webs to manage access control independently. We typically point WEBVIEWACCESSERROR at the same Main.XxxGroup page which controls access to the web. It explains the rules for who can access the web and who to contact to gain access, as well as the actual access control GROUP list.

-- MikeSalisbury - 14 Sep 2004

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2008-09-17 - TWikiJanitor
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.