[wicked] Re: [dev] wicked permissions, attempt #2

Ben Chavet ben at chavet.net
Fri Dec 3 07:26:27 PST 2004


I can certainly do that.

--Ben

Quoting "Jason M. Felice" <jfelice at cronosys.com>:

> On Thu, Dec 02, 2004 at 11:35:50PM -0600, Ben Chavet wrote:
>> >I wasn't real sure about this part either.  I can see benefits to either
>> >way,
>> >but I think I agree now that they should be in pages:, if for no other
>> >reason
>> >than to keep listPages() as simple as possible.
>>
>> Here is a patch to api.php to show the "special pages" in the permission UI.
>>
>> --Ben
>
> Would you be willing, instead, to change getPages() to return the names of
> special pages by checking the contents of lib/Page/*.php and filtering out
> 'StandardPage'?  This would meet my need for simplicity, and it would
> also solve the "special pages look deleted" issue.  If not, I'll commit this
> and a note in TODO.
>
> Thanks!
>
>> ? wicked.patch
>> Index: lib/api.php
>> ===================================================================
>> RCS file: /repository/wicked/lib/api.php,v
>> retrieving revision 1.10
>> diff -u -r1.10 api.php
>> --- lib/api.php	31 May 2004 18:22:51 -0000	1.10
>> +++ lib/api.php	3 Dec 2004 05:33:32 -0000
>> @@ -29,6 +29,27 @@
>>      $perms['tree']['wicked']['pages'] = array();
>>      $perms['title']['wicked:pages'] = _("Pages");
>>
>> +    $perms['tree']['wicked']['pages'] = array();
>> +    $perms['title']['wicked:pages'] = _("Pages");
>> +
>> +    $perms['tree']['wicked']['pages']['AllPages'] = false;
>> +    $perms['title']['wicked:pages:AllPages'] = 'AllPages';
>> +
>> +    $perms['tree']['wicked']['pages']['LeastPopular'] = false;
>> +    $perms['title']['wicked:pages:LeastPopular'] = 'LeastPopular';
>> +
>> +    $perms['tree']['wicked']['pages']['MostPopular'] = false;
>> +    $perms['title']['wicked:pages:MostPopular'] = 'MostPopular';
>> +
>> +    $perms['tree']['wicked']['pages']['PageSearch'] = false;
>> +    $perms['title']['wicked:pages:PageSearch'] = 'PageSearch';
>> +
>> +    $perms['tree']['wicked']['pages']['RecentChanges'] = false;
>> +    $perms['title']['wicked:pages:RecentChanges'] = 'RecentChanges';
>> +
>> +    $perms['tree']['wicked']['pages']['TitleSearch'] = false;
>> +    $perms['title']['wicked:pages:TitleSearch'] = 'TitleSearch';
>> +
>>      foreach ($wicked->getPages() as $pageName) {
>>          $perms['tree']['wicked']['pages'][$pageName] = false;
>>          $perms['title']['wicked:pages:' . $pageName] = $pageName;
>
> --
>  Jason M. Felice
>  Cronosys, LLC <http://www.cronosys.com/>
>  216.221.4600 x302
>




More information about the wicked mailing list