public virtual ActionResult Create(CreateViewModel model, FoundryUser user)
        {
            if (!ModelState.IsValid)
            {
                model.ProviderNames = _sourceControlManager.ProviderNames.Select(x => new SelectListItem { Text = x, Value = x, Selected = x == model.SelectedProviderName });
                return View(model);
            }

            _sourceControlManager.CreateUserProject(user.Id, model.SelectedProviderName, user.Name, model.Name, false);

            return RedirectToAction(MVC.Dashboard.Index())
                .WithMessage(this, "Project successfully created", ViewMessageType.Info);
        }
        public virtual ActionResult Index(FoundryUser user)
        {
            var auth = this.AuthorizationService.GetAuthorizationInformation(user.Id);

            var userNewsItems = auth.Filter(_newsItemRepository, u => u.UserId, SubjectType.User, "Read");
            var projects = auth.Filter(_projectRepository, r => r.Id, SubjectType.Project, Operation.Write);

            var model = new IndexViewModel
            {
                NewsItems = userNewsItems.Take(20).OrderByDescending(x => x.DateTime).ToList(),
                WritableProjects = projects.ToList()
            };
            return View(model);
        }
 public virtual ActionResult Yours(FoundryUser user)
 {
     return View();
 }
 public FormsAuthenticationResult(FoundryUser user, bool rememberMe)
 {
     _user = user;
     _rememberMe = rememberMe;
 }