This repository has been archived by the owner on Oct 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathAdapter.php
57 lines (51 loc) · 1.59 KB
/
Adapter.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
/**
* Part of the Piwik Login Shibboleth Plug-in.
*/
namespace Piwik\Plugins\LoginShibboleth;
/**
* Adapter is the abstract class for data retrievals.
*
* Any data retrieval class should extend this class, which makes them have at least the function listed here.
* If there is plan to extend all adapters changes should be added here.
*
* @author Pouyan Azari <pouyan.azari@uni-wuerzburg.de>
* @license MIT
* @copyright 2014-2016 University of Wuerzburg
* @copyright 2014-2016 Pouyan Azari
*/
abstract class Adapter
{
/**
* Search for the users properties in the LDAP according to the settings.
*
* @param string $username (LDAP username of the user)
*
* @return array("view"=>array(),"admin"=>array(),"superuser"=>false);
*/
abstract public function getUserProperty($username);
/**
* Returns the SuperUser status of the User.
*
* @param $username string Login given by the User.
*/
abstract public function getUserSuperUserStatus($username);
/**
* Returns the Urls in which the User has view access.
*
* @param $username string Login given by the User.
*/
abstract public function getUserViewUrls($username);
/**
* Returns the Urls in which the User has Admin access.
*
* @param $username string Login given by the User.
*/
abstract public function getUserAdminUrls($username);
/**
* Returns the User information, normally not needed from ldap.
*
* @param $username string Login given by the User.
*/
abstract public function getUserInfo($username);
}