mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-11-29 08:56:03 +00:00
Add all/any option to NeedPrivilege method also.
This commit is contained in:
1 parent
55cb133bb9
commit
82259f1e0e
1 file changed
+2
-2
+2
-2
@@ -657,10 +657,10 @@ EOQRY;
|
||||
*
|
||||
* @param string $privilege The name of the needed privilege.
|
||||
*/
|
||||
function NeedPrivilege( $privilege ) {
|
||||
function NeedPrivilege( $privilege, $any = null ) {
|
||||
global $request;
|
||||
|
||||
if ( $this->HavePrivilegeTo($privilege, false) ) return;
|
||||
if ( $this->HavePrivilegeTo($privilege, $any) ) return;
|
||||
|
||||
$request->NeedPrivilege( $privilege, $this->dav_name );
|
||||
exit(0); // Unecessary, but might clarify things
|
||||
|
||||
Reference in new issue
Block a user