[pmwiki-users] syntax question php for a Profiles.php

Florian Fischer Flori-Fischer at gmx.net
Fri Nov 17 05:09:14 CST 2006


Hello,

i'm using Userauth and since i haven't found a possibility to restrict the edit-access to the pages of a user, i try it with a workaround. My Users have edit-rights for the Group Profiles. But User B shouldn't be able to edit the pages of User A. There is no automatic way to do this. I try it with a Profiles.php file

$pagename = ResolvePageName($pagename);
  $isAdminAuthorized = CondAuth($pagename, 'admin');
  global $Author;
  if (!$isAdminAuthorized) {
     if ($pagename != '{$Author}' || $pagename != '{$Author}-Contribution' || $pagename != '{$Author}-Watchlist'){
     if ($action == 'edit') $action = 'browse';}

  } 

But i don't know how to turn the if clause right

if (!$isAdminAuthorized) {
     if ($pagename != '{$Author}' || $pagename != '{$Author}-Contribution' || $pagename != '{$Author}-Watchlist'){
     if ($action == 'edit') $action = 'browse';}

i don't know what exactly is in $pagename and i don't know how to use the {$Author} in the condition. 

Any ideas?

FLorian 
-- 
"Ein Herz für Kinder" - Ihre Spende hilft! Aktion: www.deutschlandsegelt.de
Unser Dankeschön: Ihr Name auf dem Segel der 1. deutschen America's Cup-Yacht!




More information about the pmwiki-users mailing list