示例#1
0
        /// <summary>
        /// Get the specified request.
        /// </summary>
        /// <param name="request">Request.</param>
        public object Get(UserGetPublicProfileRequestTep request)
        {
            WebUserProfileTep result;

            var context = TepWebContext.GetWebContext(PagePrivileges.UserView);

            try {
                context.Open();
                context.LogInfo(this, string.Format("/user/{{id}}/public GET Id='{0}'", request.identifier));
                context.AccessLevel = EntityAccessLevel.Administrator;
                UserTep user = UserTep.GetPublicUser(context, request.identifier);
                result = new WebUserProfileTep(context, user);
                context.Close();
            } catch (Exception e) {
                context.LogError(this, e.Message, e);
                context.Close();
                throw e;
            }
            return(result);
        }