예제 #1
0
        private List <Role> GetRoles(string userName, string domain)
        {
            string      key   = this.GetCacheKeyForRoles(userName, domain);
            List <Role> roles = m_Session[key] as List <Role>;

            if (roles != null)
            {
                return(roles);
            }
            roles = KeystoneDA.GetAuthRolesByUser(userName, domain, m_KS_ApplicationIds.ToList()).ToMsg();
            m_Session.Add(key, roles);
            return(roles);
        }
예제 #2
0
        private List <AuthFunctionMsg> GetFunctions(string userName, string domain)
        {
            string key = this.GetCacheKeyForFunctions(userName, domain);
            List <AuthFunctionMsg> functions = m_Session[key] as List <AuthFunctionMsg>;

            if (functions != null)
            {
                return(functions);
            }
            functions = KeystoneDA.GetAuthFunctionalAbilities(userName, domain, m_KS_ApplicationIds.ToList()).ToMsg();
            m_Session.Add(key, functions);

#if TRACE
            System.Diagnostics.Trace.WriteLine(string.Format("{0}", functions.Count));
#endif

            return(functions);
        }