ewiki

No plugin at all

Here's another example, on how to skip the 'plugin writing' thing
completely by just setting $ewiki_ring whenever possible (you should
then load the auth_perm_ring plugin).

  <?php
      $ewiki_ring = 3;  // view/browse/read-only Wiki

      if ($_COOKIE["username"] || $_COOKIE["LOGINSESS"]) {  // simple guess

         $ewiki_ring = 2;      // allows "edit" action and others

         if ($user_is_admin) {   // (already set somewhere else)
            $ewiki_ring = 0;     // this grants access to admin/ plugins
         }
      }
  ?>

This is in fact the recommended way to do restriction stuff (the
simplest solutions are always the best).
prev << "No plugin at all"
next >> "Everything into auth_perm"


You cannot modify the ProtectedMode file, but anyhow any ideas or suggestion should as usually get filed on BugReports, UserSuggestions or even better the ProtectedMode.Discussion.