From 2c8fcb129c45faecd1a480c44f8a1708f768b91d Mon Sep 17 00:00:00 2001 From: jrags <> Date: Tue, 19 Sep 2006 03:04:28 +0000 Subject: Inital Checkin of new membership and role providers. Currently still in development --- framework/Web/Security/TRoles.php | 228 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 228 insertions(+) create mode 100644 framework/Web/Security/TRoles.php (limited to 'framework/Web/Security/TRoles.php') diff --git a/framework/Web/Security/TRoles.php b/framework/Web/Security/TRoles.php new file mode 100644 index 00000000..45e112c7 --- /dev/null +++ b/framework/Web/Security/TRoles.php @@ -0,0 +1,228 @@ +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::$_s_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::$_s_Initialized) + { + if (self::$_s_InitializeException!==null) + { + throw new $_s_InitializeException; + } + } + else + { + if (self::$_s_Initialized) + { + if (self::$_s_InitializeException!==null) + { + throw new $_s_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) + { + + } +} +?> \ No newline at end of file -- cgit v1.2.3