[dev] removeUserData permissions
Michael Rubinsky
mike at theupstairsroom.com
Thu Jun 22 08:45:41 PDT 2006
Quoting Jan Schneider <jan at horde.org>:
> Why not simply adding an Auth::isAdmin() test to _mnemo_delete()?
Well, sure, if you want to do it the easy way ;)
Like the attached patch?
Thanks,
mike
--
The Horde Project (www.horde.org)
mrubinsk at horde.org
-------------- next part --------------
? diff.txt
Index: api.php
===================================================================
RCS file: /repository/mnemo/lib/api.php,v
retrieving revision 1.73
diff -u -r1.73 api.php
--- api.php 31 May 2006 16:13:34 -0000 1.73
+++ api.php 22 Jun 2006 15:42:36 -0000
@@ -377,7 +377,8 @@
return $memo;
}
- if (!array_key_exists($memo['memolist_id'], Mnemo::listNotepads(false, PERMS_DELETE))) {
+ if (!array_key_exists($memo['memolist_id'], Mnemo::listNotepads(false, PERMS_DELETE)) &&
+ !Auth::isAdmin()) {
return PEAR::raiseError(_("Permission Denied"));
}
More information about the dev
mailing list