User talk:JEisen

From mediawiki.org
Latest comment: 13 years ago by Connector

Hello
I can't install your diff patch on Windows using cygwin
Always had the same error:
Hunk #1 FAILED at 376. 1 out of 1 hunk FAILED -- saving rejects to file includes/specials/SpecialSearch.php.rej

Do you have any suggestion for it?

PS:I'm not cool in linux.

--Connector 11:53, 26 November 2010 (UTC)Reply

Hi Connector, It sounds like you're probably trying to install on an unsupported version. Unfortunately I haven't has time to update the extension to work on MW 1.14 or later. I do have plans to do that, but I don't have a firm schedule.


Hi
I tried your extension but can not get it to work , gives me the errors similar to this:
Warning: fopen(/home/jeisen/wiki.log) [function.fopen]: failed to open stream: No such file or directory in C:\wamp\www\wiki\extensions\improved-accesscontrol-1.1\improved-accesscontrol-body.php on line 68

I guess it's trying to open file in nonexisting directory /home/jeisen/ can this be changed ?

Regerds Mateusz

Hi Mateusz, you're right, I left some non-default options in there in my last release accidentally. Try it now, but make sure you edit improved-accesscontrol-options.php to how you need it. That step should probably get moved higher in the instructions. Let me know if this works better for you! JEisen

Thanks its working now.
Just one thing i've noticed. I use the parameters :
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['read'] = false;
to prevent any actions of not logged in users.
Your extension seems to overwrite those , because after its enabled, my wiki grants access everywhere (except the prtected articles of course). Regards Mateusz


- This is true. Anonymous permissions are not implemented yet, but I'll add a bug that it doesn't respect wgGroupPermissions. (See http://code.google.com/p/improved-accesscontrol/issues/list) JEisen 16:49, 6 January 2009 (UTC)Reply


Hi, I love your extension so much!
Here is some modification applied on my wiki system. I wonder if these modifications can be applied into "official" improved access control
Function: for example, a page named "help:extension:Improved Access Control" doesn't have any accesscontrol tag, then system will try to get "default access control" from following pages

  1. help:extension
  2. help
  3. SysOp

in AccessHooks.php:

    // Get the content of the article
    $content = efIACGetArticleContent( $titleObj );
    
    // Get the access control list from that content
    $accessList = efIACGetAccessList( $content );

change to

  $parentTitle = $title->getPrefixedText();
  if(efIACMakeTitle( $parentTitle )->exists() === true){
    while(true){
      $titleObj = efIACMakeTitle( $parentTitle );
      
      // Get the content of the article
      $content = efIACGetArticleContent( $titleObj );
      
      // Get the access control list from that content
      $accessList = efIACGetAccessList( $content );
      if($accessList === false){
        unset($content);
        unset($titleObj);
      } else {
        unset($titleObj);
        break;
      }
      
      $pos = strrpos($parentTitle, ":");
      if($pos === false){
        if(strcmp($parentTitle, "SysOp") === 0)
          break;
        else
          $parentTitle = "SysOp";
          
      }else{
        $parentTitle = substr($parentTitle, 0, $pos);
      }
    }
  }


Function: <<personal accesscontrol>> we can let someone in a Usergroup "Read-Only" while the others has full privilege. for example,
the content of Usergroup:test

 *Carol
 *Samuelcdf(ro)

the content of a page

<accesscontrol>test</accesscontrol>

then Carol can read\write this page, but Samuelcdf can only read

the content of another page

<accesscontrol>test(ro)</accesscontrol>

then both Carol and Samuelcdf can only read the page


change function in AccessHookSupport.php:

 function efIACGetAllowedUsersFromGroupPages(&$groupNames){
   // Set up return arrays
   $allowedUsersFull = Array();
   $allowedUsersReadOnly = Array();
   
   // Go through each group and store the users
   foreach($groupNames as $accessGroup){
     
     // If group is listed as (ro), set readOnly to true
     $readOnly = false;
     $name = str_replace( '(ro)', '' , $accessGroup );
     if($accessGroup !== $name){
       $readOnly = true;
     }
     
     // Get the page content for the Usergroup page
     $pageContent = efIACGetArticleContent( 'Usergroup:'.$name );
     
     if( $pageContent !== false ){
       
       // Get the list of users
       $usersFromGroup = explode( '*', $pageContent );
       
       // Put the users in the appropriate return array as lowercase
       foreach($usersFromGroup as $accessUser){
         $trimmedUser = trim( $accessUser );
         if( $trimmedUser != '' ){
           $userToAdd = strtolower( $trimmedUser );
           if( $readOnly ){
             $allowedUsersReadOnly[] = trim(str_replace( '(ro)', '' , $userToAdd ));
           } else {
             $userName = trim(str_replace( '(ro)', '' , $userToAdd ));
             if( $userToAdd !== $userName ){
               $allowedUsersReadOnly[] = $userName;
             } else {
               $allowedUsersFull[] = $userName;
             }
           }
         }
       }
     }
   }
   
   $allowedUsers[0] = $allowedUsersFull;
   $allowedUsers[1] = $allowedUsersReadOnly;

   efIACDebugList( "(efIACGetAllowedUsersFromGroupPages) edit users: ", 
           $allowedUsers[0] );
   efIACDebugList( "(efIACGetAllowedUsersFromGroupPages) read users: ",
           $allowedUsers[1] );
   
   return $allowedUsers;
 }


best regards

Samuelcdf 2/4/2009