Zeta Components Manual :: Docs For Class ezcWebdavAuthorizer
Webdav::ezcWebdavAuthorizer
Interface ezcWebdavAuthorizer
Interface for classes providing authorization.
This interface must be implemented by classes the provide authorization to an ezcWebdavBackend. A back end will call the authorize() method for each path that is affected by request.
Source for this file: /Webdav/src/interfaces/authorizer.php
| Version: | //autogentag// | 
Descendants
| Child Class | Description | 
|---|---|
| ezcWebdavLockAuthorizer | Interface to be implemented by authorization classes for the lock plugin. | 
Constants
| 
            ACCESS_READ
             =  1
           | User desires read access. | 
| 
            ACCESS_WRITE
             =  2
           | User desires write access. | 
Method Summary
| public bool | 
              authorize(
                                                                                    $user
                                                    ,                                     $path
                                                    ,                   [                  $access
                   = self::ACCESS_READ]                               )
            Checks authorization of the given $user to a given $path. | 
Methods
authorize
Checks authorization of the given $user to a given $path.
This method checks if the given $user has the permission $access to the resource identified by $path. The $path is the result of a translation by the servers ezcWebdavPathFactory from the request URI.
The $access parameter can be one of
The implementation of this method must only check the given $path, but MUST not check descendant paths, since the back end will issue dedicated calls for such paths. In contrast, the algoritm MUST ensure, that parent permission constraints of the given $paths are met.
Examples: Permission is rejected for the paths "/a", "/b/beamme" and "/c/connect":
- <?php
- ?>
Parameters:
| Name | Type | Description | 
|---|---|---|
| $user | string | |
| $path | string | |
| $access | int |