mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-27 02:54:27 +00:00
Add all/any option to NeedPrivilege method also.
This commit is contained in:
parent
55cb133bb9
commit
82259f1e0e
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user