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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
|
<?php
/**
* TRoles class.
* Manages user membership in roles for authorization checking in an PRADO application. This class cannot be inherited.
*
* @author Jason Ragsdale <jrags@jasrags.net>
* @version $Id: TRoles.php 1398 2006-09-08 19:31:03Z xue $
* @package System.Web.Security
* @since 3.1
*/
final class TRoles
{
private static $_ApplicationName;
private static $_CacheRolesInCookie=false;
private static $_CookieName;
private static $_CookiePath;
private static $_CookieProtectionValue;
private static $_CookieRequireSSL=false;
private static $_CookieSlidingExpiration=false;
private static $_CookieTimeout;
private static $_CreatePersistentCookie=false;
private static $_Domain;
private static $_Enabled=false;
private static $_MaxCachedResults;
private static $_Provider;
private static $_Providers;
private static $_EnabledSet=false;
private static $_Initialized=false;
private static $_InitializeException;
public static function getApplicationName()
{
return self::$_ApplicationName;
}
public static function setApplicationName($value)
{
self::$_ApplicationName = TPropertyValue::ensureString($value);
}
public static function getCacheRolesInCookie()
{
return self::$_CacheRolesInCookie;
}
public static function getCookieName()
{
return self::$_CookieName;
}
public static function getCookiePath()
{
return self::$_CookiePath;
}
public static function getCookieProtectionValue()
{
return self::$_CookieProtectionValue;
}
public static function getCookieRequireSSL()
{
return self::$_CookieRequireSSL;
}
public static function getCookieSlidingExpiration()
{
return self::$_CookieSlidingExpiration;
}
public static function getCookieTimeout()
{
return self::$_CookieTimeout;
}
public static function getCreatePersistentCookie()
{
return self::$_CreatePersistentCookie;
}
public static function getDomain()
{
return self::$_Domain;
}
public static function getEnabled()
{
return self::$_Enabled;
}
public static function getMaxCachedResults()
{
return self::$_MaxCachedResults;
}
public static function getProvider()
{
return self::$_Provider;
}
public static function getProviders()
{
return self::$_Providers;
}
public static function AddUsersToRole($usernames,$roleName)
{
}
public static function AddUsersToRoles($usernames,$roleNames)
{
}
public static function AddUserToRole($username,$roleName)
{
}
public static function AddUserToRoles($username,$roleNames)
{
}
public static function CreateRole($roleName)
{
self::EnsureEnabled();
self::$_Provider->CreateRole($roleName);
}
public static function DeleteCookie()
{
}
public static function DeleteRole($roleName,$throwOnPopulatedRole=true)
{
self::EnsureEnabled();
// $flag1 = self::$_Provider->DeleteRole($roleName,$throwOnPopulatedRole);
// try
// {
// $principal1 = self::GetCurrentUser();
// }
// catch ()
// {
//
// }
}
private static function EnsureEnabled()
{
self::Initialize();
if (!self::$_Initialized)
{
throw new TException('Roles_feature_not_enabled');
}
}
public static function FindUsersInRole($roleName,$usernameToMatch)
{
}
public static function GetAllRoles()
{
}
private static function GetCurrentUser()
{
}
private static function GetCurrentUserName()
{
}
public static function GetRolesForUser($username=null)
{
}
public static function GetUsersInRole($roleName)
{
}
private static function Initialize()
{
if (self::$_Initialized)
{
if (self::$_InitializeException!==null)
{
throw new $_s_InitializeException;
}
}
else
{
if (self::$_Initialized)
{
if (self::$_InitializeException!==null)
{
throw new $_InitializeException;
}
return;
}
try
{
self::$_Enabled;
self::$_CookieName;
self::$_CookiePath;
self::$_CacheRolesInCookie;
self::$_CookieTimeout;
self::$_CookiePath;
self::$_CookieRequireSSL;
self::$_CookieSlidingExpiration;
self::$_CookieProtectionValue;
self::$_Domain;
self::$_CreatePersistentCookie;
self::$_MaxCachedResults;
if (self::$_Enabled)
{
if (self::$_MaxCachedResults < 0)
{
throw new TException('Value_must_be_non_negative_integer',self::$_MaxCachedResults);
}////stopped here
}
}
catch (TException $e)
{
}
}
}
public static function IsUserInRole($roleName,$username=null)
{
}
public static function RemoveUserFromRole($username,$roleName)
{
}
public static function RemoreUserFromRoles($username,$roleNames)
{
}
public static function RemoveUsersFromRole($usernames,$roleName)
{
}
public static function RemoveUsersFromRoles($usernames,$roleNames)
{
}
public static function RoleExists($roleName)
{
}
}
?>
|