<div dir="ltr">somehow, $Group is not the same as $DefaultGroup, even when both hold the string "Main"<br></div><div class="gmail_extra"><br clear="all"><div>-Michael Paulukonis<br><a href="http://www.xradiograph.com" target="_blank">http://www.xradiograph.com</a><br>

<a href="http://goog_2112721603" target="_blank"></a><a href="http://www.xradiograph.com%5Cinterference" target="_blank">Interference Patterns (a blog)</a><br><a href="https://twitter.com/XraysMonaLisa" target="_blank">@XraysMonaLisa</a><br>

<a href="http://michaelpaulukonis.com" target="_blank">http://michaelpaulukonis.com</a><br><a href="http://www.BestAndroidResources.com" target="_blank"></a><br><br>Sent from somewhere in the Cloud<br>(hearthrug, by the fender)<br>

</div>
<br><br><div class="gmail_quote">On Wed, Oct 30, 2013 at 11:33 PM, michael paulukonis <span dir="ltr"><<a href="mailto:xraysmalevich@gmail.com" target="_blank">xraysmalevich@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><div><div><div>Thanks, Tamara.<br><br></div>Something is happening well beyond my php-fu (which is so low I don't even have a belt).<br></div>The negative case is ALWAYS true.<br>Even, say in the "Main" or "PmWiki" groups.<br>


</div>I've dumped the array and variables to the page to check -- and it sure looks to _me_ like the $Group should be found in the array, but PHP is telling me it ain't so.<br><br>???<br></div><div class="gmail_extra">

<div class="im">
<br clear="all"><div>-Michael Paulukonis<br><a href="http://www.xradiograph.com" target="_blank">http://www.xradiograph.com</a><br><a href="http://goog_2112721603" target="_blank"></a><a href="http://www.xradiograph.com%5Cinterference" target="_blank">Interference Patterns (a blog)</a><br>


<a href="https://twitter.com/XraysMonaLisa" target="_blank">@XraysMonaLisa</a><br><a href="http://michaelpaulukonis.com" target="_blank">http://michaelpaulukonis.com</a><br><a href="http://www.BestAndroidResources.com" target="_blank"></a><br>


<br>Sent from somewhere in the Cloud<br>(hearthrug, by the fender)<br></div>
<br><br></div><div><div class="h5"><div class="gmail_quote">On Wed, Oct 30, 2013 at 8:52 PM, Tamara Temple <span dir="ltr"><<a href="mailto:tamouse.lists@gmail.com" target="_blank">tamouse.lists@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br>
On Oct 30, 2013, at 8:23 AM, michael paulukonis <<a href="mailto:xraysmalevich@gmail.com" target="_blank">xraysmalevich@gmail.com</a>> wrote:<br>
<br>
> [since the two words are identical, I will be using an uppercase "Group" to refer to PmWiki Groups of pages, and use a lowercase "group" to refer to AuthUser groups of users]<br>
><br>
> Is there a programmatic way to restrict group access?<br>
> I'm setting up a wiki for others to maintain, who will be creating users and Groups.<br>
> Each Group should be restricted to one AuthUser group.<br>
> Ideally, the AuthUser group would have the same name as the Group.<br>
> This would mean that once a Group is created and users are added to the AuthUser group, no further action would have to be taken by the administrator.<br>
><br>
> However, I haven't figured out how to set Group restrictions without using {Group}.GroupAttributes?action=attr and manually setting the group.<br>
><br>
><br>
> Would it be possible to do something like the following in local/config.php ?<br>
><br>
> // exclude Groups like PmWiki, Main, etc.<br>
> if ($Group != 'Site') {<br>
>   $DefaultPasswords['read'] = array('@$Group', 'id:admin'); // restrict to group and admin<br>
> }<br>
><br>
> I believe I tried the above and it didn't work (I'm away from my dev machine right now).<br>
><br>
> If something like this is possible, could it easily be extended to add additional users or groups via GroupAttributes without modifying config.php?<br>
><br>
> -Michael Paulukonis<br>
<br>
</div>Not really sure if this is an answer, and I’ve not even tried this, but:<br>
<div><br>
// exclude Groups like PmWiki, Main, etc.<br>
</div>if ( ! in_array($Group, array($SiteGroup, $SiteAdminGroup, 'PmWiki', $DefaultGroup ) {<br>
  $group = strtolower($Group); // to refer to AuthUser group associated with PmWiki Group?<br>
  $DefaultPasswords['read'] = array("@$group", 'id:admin'); // restrict to group and admin. Interpolate?<br>
}<br>
<br>
I think you’ll want the AuthUser group here, so down case the PmWIki Group. Also, I think you want that interpolated immediately in the assignment for DefaultPasswords, no?<br>
<br>
Also, the in_array thingie for checking might be a touch more robust using the variables…<br>
<br>
Again, just off the cuff, not tried it.<br>
<br>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>