[dev] _PERM_SHOW for application viewing
W. David Betts
david at populus.com
Wed Dec 17 13:16:13 PST 2003
This patch allows applications to be hidden from users based on the
_PERMS_SHOW permission for the application. If a permission for the
application doesn't exist the application is displayed so that a permison
doesn't have to be added for every application in the system.
--david
Index: services/portal/menu.php
===================================================================
RCS file: /repository/horde/services/portal/menu.php,v
retrieving revision 2.52
diff -r2.52 menu.php
53a54
> require_once HORDE_BASE . '/lib/Perms.php';
61a63,64
> $perms = &Perms::singleton();
>
78a82,91
>
> // check that the user has permissons to see this application, admin
users always see all apps
> if ( ($perms->exists($app)) && !($perms->hasPermission($app,
Auth::getAuth(), _PERMS_SHOW))
> && !(Auth::isAdmin())) {
>
> Horde::logMessage(sprintf("User %s doesn't have SHOW permision for
%s",Auth::getAuth(),$app),
> __FILE__,__LINE__,PEAR_LOG_DEBUG);
> continue;
> }
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: menu_perms.patch
Type: application/octet-stream
Size: 735 bytes
Desc: not available
Url : http://lists.horde.org/archives/dev/attachments/20031217/db90b0e8/menu_perms.obj
More information about the dev
mailing list