yavsc/web/Controllers/AccountController.cs

442 lines
13 KiB
C#

12 years ago
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Mail;
using System.Web;
using System.Web.Configuration;
using System.Web.Profile;
using System.Web.Security;
using Yavsc;
11 years ago
using Yavsc.Model.RolesAndMembers;
12 years ago
using Yavsc.Helpers;
using System.Web.Mvc;
11 years ago
using Yavsc.Model.Circles;
* AccountController.cs: Register and reset passord from Web API * GCMController.cs: initial creation, will host GCM calls and related procedures. * ResetPassword.aspx: Html view to reset the password * LocalizedText.resx: * LocalizedText.fr.resx: new String form circles * Web.config: * Web.csproj: * YavscModel.csproj: * LocalizedText.Designer.cs: * Profile.cs: * Profile.cs: * LocalizedText.fr.Designer.cs: * LoginModel.cs: * Publishing.cs: * CalendarController.cs: * LoginModel.cs: * GCMRegister.cs: * Publishing.cs: * GCMRegister.cs: * NewRoleModel.cs: * NewRoleModel.cs: * RegisterModel.cs: * NewAdminModel.cs: * RegisterModel.cs: * NewAdminModel.cs: * LostPasswordModel.cs: * RegisterViewModel.cs: * RegisterViewModel.cs: * ProviderPublicInfo.cs: * RegisterClientModel.cs: * ChangePasswordModel.cs: * ProviderPublicInfo.cs: * RegisterClientModel.cs: * ChangePasswordModel.cs: Fixes a typo (in the namespace :-/) * NpgsqlCircleProvider.cs: Fixes the Circle creation * Global.asax.cs: * AdminController.cs: * NpgsqlContentProvider.cs: code formatting * BlogsController.cs: * CircleController.cs: * WorkFlowController.cs: * PaypalApiController.cs: * FrontOfficeController.cs: refactoring * AccountController.cs: Adds the way to reset the password * FrontOfficeController.cs: xml doc * T.cs: Make this class an helper to translation * YavscHelpers.cs: Implements the e-mail sending * style.css: style uniformization * Circles.aspx: Implements the Html interface to Circle creation (modifications and deletions are still to implement) * Register.ascx: Allows the error display in case of lack of power of the user at registering another user. * Estimate.aspx: use the partial view to register from the Account folder. Cleans the useless reference to ~/Theme/dark/style.css, that was for using the "tablesorter.js", no used anymore. * Web.config: Trying to have all the Index pages to work...
11 years ago
using System.Collections.Specialized;
using System.Text;
using System.Net;
using System.Configuration;
Many fixes * Profile.aspx: * ProfileEdition.cs: Fixes the username modification * Book-next.aspx: pollution * NpgsqlMembershipProvider.cs: xmldoc * NpgsqlProfileProvider.cs: use default values from configuration * NpgsqlUserNameProvider.cs: Fixes the username detection * test-domain-TestAPI.config: profile dates must be returned as DateTime * instdbws.sql: The conversion to a valid .Net DateTime requires a credible date time as source value, the null one is not supported. * style.css: Fixes the new notification style * AccountController.cs: Fixes the profile edition. Now using the anti forgery key at login time * Book.aspx: * LocalizedText.resx: * LocalizedText.fr.resx: * CalendarApi.cs: * GoogleController.cs: * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: WIP booking * HomeController.cs: code prettying * Global.asax.cs: Limits the usage of titles in a route to the blog controller * OAuth2.cs: Profile values may be of type DBNull ... * T.cs: All translated strings will be Html encoded, as expected from an html helper * YavscHelpers.cs: A new method to build a javascript string... * App.master: * AppAdmin.master: Notification.body is now a js string literal * NoLogin.master: sync with the true master * Login.aspx: Permits the anti forgery key usage * Estimate.aspx: refactoring * Web.config: Fixes a later commit on the catalog name space * Web.csproj: An ajax helper to notify * ChangePasswordModel.cs: * RegisterClientModel.cs: A regexp for user name * LoginModel.cs: A regexp for user name and password * Profile.cs: A regexp for user name, and profile usage fixes * UserManager.cs: Checks for username availability before trying to modify it * YavscModel.csproj: `ProfileEdition` class addition * ChangeLog: should not be indexed * ChangeLog: useless here * ValidateAjaxAttribute.cs: Fixes usage of HtmlFieldPrefix * BookQuery.cs: Start, end hour and role are required * OtherWebException.cs: useless
10 years ago
using Yavsc.Model;
Implemente la gestion des activités * Activities.aspx: implémente la vue Html de la liste éditable des activités * Activity.ascx: implémente la vue Html d'une activité * NpgsqlContentProvider.cs: implemente la gestion des activités côté base de donnée Npgsql * TestAPI.csproj: ... une référence au framework 4.5.1 en moins ... * FrontOfficeController.cs: Le contrôleur du FrontOffice gére les activités * Global.asax.cs: nettoyage du code * activity.sql: Typo corrigée sur le terme "MEACode" * style.css: enlève des images qui n'ont plus rien à faire ici, tant ce fichier concerne maintenant uniquement la disposition ou les éléments de base. * AccountController.cs: implémente le contrôle par l'utilisateur du paramêtre de l'activité principale associé à son profile. * FrontOfficeController.cs: Implemente le contrôle de la page des activités, et simplifie le contrôle de la page des compétences. * HomeController.cs: formattage du code * ModuleController.cs: inutilisé * App.master: Theming explicite en page maître * Profile.aspx: Propose maintenant l'édition de l'activité principalement éxercée * Skills.aspx: supprime une ligne de log * Index.aspx: RAZ en home page * MarkdownDeep.dll: remplace le tag englobant les transformations, il était un "<p>", il est maintenant un "<span>". * BlogManager.cs: refactorisation * Activity.cs: implémente un type de commande à associer à une activité. * LocalizedText.fr.resx: * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: La traduction de "ne pas publier mon activité" * LocalizedText.resx: La traduction de "ne pas publier mon activité", et de "Votre activité" * ManagerHelper.cs: refabrique l'instanciation des fournisseurs du workflow, pour avoir une liste de toutes les activité prises en charges par tous les fournisseurs de contenu. * Profile.cs: Implement le code activité de l'objet `Profile` * ProfileEdition.cs: xmldoc * SkillManager.cs: Formattage du code source * IContentProvider.cs: reformattage du code+ propriété "Name" du fournisseur + definition des methodes relatives à la gestion des activités * WorkFlowManager.cs: Methodes de recupperation des activités fournies auprés des fournisseurs de contenu * YavscModel.csproj: renommage * Web.csproj: reference les nouveaux éléments du projet relatifs au activités * Web.config: references manquante en cas d'utilisation du paramértrage global du thème via la section system.web/pages du fichier de configuration.
10 years ago
using Yavsc.Model.WorkFlow;
12 years ago
namespace Yavsc.Controllers
{
/// <summary>
/// Account controller.
/// </summary>
12 years ago
public class AccountController : Controller
{
/// <summary>
/// Avatar the specified user.
/// </summary>
/// <param name="id">User.</param>
[AcceptVerbs (HttpVerbs.Get)]
public ActionResult Avatar (string id)
{
string avatarLocation = Url.AvatarUrl (id);
WebRequest wr = WebRequest.Create (avatarLocation);
FileContentResult res;
using (WebResponse resp = wr.GetResponse ()) {
using (Stream str = resp.GetResponseStream ()) {
byte[] content = new byte[str.Length];
str.Read (content, 0, (int)str.Length);
res = File (content, resp.ContentType);
wr.Abort ();
return res;
}
}
}
/// <summary>
/// Index this instance.
/// </summary>
12 years ago
public ActionResult Index ()
{
return View ();
}
/// <summary>
/// Does login.
/// </summary>
/// <returns>The login.</returns>
/// <param name="model">Model.</param>
/// <param name="returnUrl">Return URL.</param>
Many fixes * Profile.aspx: * ProfileEdition.cs: Fixes the username modification * Book-next.aspx: pollution * NpgsqlMembershipProvider.cs: xmldoc * NpgsqlProfileProvider.cs: use default values from configuration * NpgsqlUserNameProvider.cs: Fixes the username detection * test-domain-TestAPI.config: profile dates must be returned as DateTime * instdbws.sql: The conversion to a valid .Net DateTime requires a credible date time as source value, the null one is not supported. * style.css: Fixes the new notification style * AccountController.cs: Fixes the profile edition. Now using the anti forgery key at login time * Book.aspx: * LocalizedText.resx: * LocalizedText.fr.resx: * CalendarApi.cs: * GoogleController.cs: * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: WIP booking * HomeController.cs: code prettying * Global.asax.cs: Limits the usage of titles in a route to the blog controller * OAuth2.cs: Profile values may be of type DBNull ... * T.cs: All translated strings will be Html encoded, as expected from an html helper * YavscHelpers.cs: A new method to build a javascript string... * App.master: * AppAdmin.master: Notification.body is now a js string literal * NoLogin.master: sync with the true master * Login.aspx: Permits the anti forgery key usage * Estimate.aspx: refactoring * Web.config: Fixes a later commit on the catalog name space * Web.csproj: An ajax helper to notify * ChangePasswordModel.cs: * RegisterClientModel.cs: A regexp for user name * LoginModel.cs: A regexp for user name and password * Profile.cs: A regexp for user name, and profile usage fixes * UserManager.cs: Checks for username availability before trying to modify it * YavscModel.csproj: `ProfileEdition` class addition * ChangeLog: should not be indexed * ChangeLog: useless here * ValidateAjaxAttribute.cs: Fixes usage of HtmlFieldPrefix * BookQuery.cs: Start, end hour and role are required * OtherWebException.cs: useless
10 years ago
[HttpPost,ValidateAntiForgeryToken]
public ActionResult Login (LoginModel model, string returnUrl)
12 years ago
{
if (ModelState.IsValid) {
if (Membership.ValidateUser (model.UserName, model.Password)) {
FormsAuthentication.SetAuthCookie (model.UserName, model.RememberMe);
if (returnUrl != null)
return Redirect (returnUrl);
11 years ago
else
return View ("Index");
12 years ago
} else {
ModelState.AddModelError ("UserName", "The user name or password provided is incorrect.");
}
}
ViewData ["returnUrl"] = returnUrl;
return View (model);
12 years ago
}
/// <summary>
/// Login the specified returnUrl.
/// </summary>
/// <param name="returnUrl">Return URL.</param>
[HttpGet]
public ActionResult Login (string returnUrl)
{
ViewData ["returnUrl"] = returnUrl;
return View ();
}
/// <summary>
/// Gets the registration form.
/// </summary>
/// <returns>The register.</returns>
/// <param name="model">Model.</param>
/// <param name="returnUrl">Return URL.</param>
public ActionResult GetRegister(RegisterViewModel model, string returnUrl)
{
ViewData ["returnUrl"] = returnUrl;
return View ("Register",model);
}
/// <summary>
/// Register the specified model and returnUrl.
/// </summary>
/// <param name="model">Model.</param>
/// <param name="returnUrl">Return URL.</param>
[HttpPost]
12 years ago
public ActionResult Register (RegisterViewModel model, string returnUrl)
{
11 years ago
ViewData ["returnUrl"] = returnUrl;
12 years ago
if (ModelState.IsValid) {
11 years ago
if (model.ConfirmPassword != model.Password) {
ModelState.AddModelError ("ConfirmPassword", "Veuillez confirmer votre mot de passe");
12 years ago
return View (model);
}
MembershipCreateStatus mcs;
var user = Membership.CreateUser (
11 years ago
model.UserName,
model.Password,
model.Email,
null,
null,
false,
out mcs);
12 years ago
switch (mcs) {
case MembershipCreateStatus.DuplicateEmail:
11 years ago
ModelState.AddModelError ("Email", "Cette adresse e-mail correspond " +
"à un compte utilisateur existant");
12 years ago
return View (model);
case MembershipCreateStatus.DuplicateUserName:
11 years ago
ModelState.AddModelError ("UserName", "Ce nom d'utilisateur est " +
"déjà enregistré");
12 years ago
return View (model);
case MembershipCreateStatus.Success:
Url.SendActivationMessage (user);
ViewData ["username"] = user.UserName;
ViewData ["email"] = user.Email;
return View ("RegistrationPending");
12 years ago
default:
11 years ago
ViewData ["Error"] = "Une erreur inattendue s'est produite" +
"a l'enregistrement de votre compte utilisateur" +
string.Format ("({0}).", mcs.ToString ()) +
"Veuillez pardonner la gêne" +
"occasionnée";
12 years ago
return View (model);
}
}
return View (model);
}
/// <summary>
/// Changes the password success.
/// </summary>
/// <returns>The password success.</returns>
12 years ago
public ActionResult ChangePasswordSuccess ()
{
return View ();
}
/// <summary>
/// Changes the password.
/// </summary>
/// <returns>The password.</returns>
12 years ago
[HttpGet]
[Authorize]
11 years ago
public ActionResult ChangePassword ()
12 years ago
{
11 years ago
return View ();
12 years ago
}
/// <summary>
/// Unregister the specified id and confirmed.
/// </summary>
/// <param name="id">Identifier.</param>
/// <param name="confirmed">If set to <c>true</c> confirmed.</param>
[Authorize]
public ActionResult Unregister (string id, bool confirmed = false)
{
ViewData ["UserName"] = id;
if (!confirmed)
return View ();
Many fixes * Profile.aspx: * ProfileEdition.cs: Fixes the username modification * Book-next.aspx: pollution * NpgsqlMembershipProvider.cs: xmldoc * NpgsqlProfileProvider.cs: use default values from configuration * NpgsqlUserNameProvider.cs: Fixes the username detection * test-domain-TestAPI.config: profile dates must be returned as DateTime * instdbws.sql: The conversion to a valid .Net DateTime requires a credible date time as source value, the null one is not supported. * style.css: Fixes the new notification style * AccountController.cs: Fixes the profile edition. Now using the anti forgery key at login time * Book.aspx: * LocalizedText.resx: * LocalizedText.fr.resx: * CalendarApi.cs: * GoogleController.cs: * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: WIP booking * HomeController.cs: code prettying * Global.asax.cs: Limits the usage of titles in a route to the blog controller * OAuth2.cs: Profile values may be of type DBNull ... * T.cs: All translated strings will be Html encoded, as expected from an html helper * YavscHelpers.cs: A new method to build a javascript string... * App.master: * AppAdmin.master: Notification.body is now a js string literal * NoLogin.master: sync with the true master * Login.aspx: Permits the anti forgery key usage * Estimate.aspx: refactoring * Web.config: Fixes a later commit on the catalog name space * Web.csproj: An ajax helper to notify * ChangePasswordModel.cs: * RegisterClientModel.cs: A regexp for user name * LoginModel.cs: A regexp for user name and password * Profile.cs: A regexp for user name, and profile usage fixes * UserManager.cs: Checks for username availability before trying to modify it * YavscModel.csproj: `ProfileEdition` class addition * ChangeLog: should not be indexed * ChangeLog: useless here * ValidateAjaxAttribute.cs: Fixes usage of HtmlFieldPrefix * BookQuery.cs: Start, end hour and role are required * OtherWebException.cs: useless
10 years ago
string logged = this.User.Identity.Name;
if (logged != id)
if (!Roles.IsUserInRole ("Admin"))
throw new Exception ("Unregister another user");
Membership.DeleteUser (
Membership.GetUser ().UserName);
11 years ago
return RedirectToAction ("Index", "Home");
}
/// <summary>
/// Changes the password.
/// </summary>
/// <returns>The password.</returns>
/// <param name="model">Model.</param>
12 years ago
[Authorize]
[HttpPost]
public ActionResult ChangePassword (ChangePasswordModel model)
{
if (ModelState.IsValid) {
// ChangePassword will throw an exception rather
// than return false in certain failure scenarios.
11 years ago
bool changePasswordSucceeded = false;
12 years ago
try {
* AccountController.cs: Register and reset passord from Web API * GCMController.cs: initial creation, will host GCM calls and related procedures. * ResetPassword.aspx: Html view to reset the password * LocalizedText.resx: * LocalizedText.fr.resx: new String form circles * Web.config: * Web.csproj: * YavscModel.csproj: * LocalizedText.Designer.cs: * Profile.cs: * Profile.cs: * LocalizedText.fr.Designer.cs: * LoginModel.cs: * Publishing.cs: * CalendarController.cs: * LoginModel.cs: * GCMRegister.cs: * Publishing.cs: * GCMRegister.cs: * NewRoleModel.cs: * NewRoleModel.cs: * RegisterModel.cs: * NewAdminModel.cs: * RegisterModel.cs: * NewAdminModel.cs: * LostPasswordModel.cs: * RegisterViewModel.cs: * RegisterViewModel.cs: * ProviderPublicInfo.cs: * RegisterClientModel.cs: * ChangePasswordModel.cs: * ProviderPublicInfo.cs: * RegisterClientModel.cs: * ChangePasswordModel.cs: Fixes a typo (in the namespace :-/) * NpgsqlCircleProvider.cs: Fixes the Circle creation * Global.asax.cs: * AdminController.cs: * NpgsqlContentProvider.cs: code formatting * BlogsController.cs: * CircleController.cs: * WorkFlowController.cs: * PaypalApiController.cs: * FrontOfficeController.cs: refactoring * AccountController.cs: Adds the way to reset the password * FrontOfficeController.cs: xml doc * T.cs: Make this class an helper to translation * YavscHelpers.cs: Implements the e-mail sending * style.css: style uniformization * Circles.aspx: Implements the Html interface to Circle creation (modifications and deletions are still to implement) * Register.ascx: Allows the error display in case of lack of power of the user at registering another user. * Estimate.aspx: use the partial view to register from the Account folder. Cleans the useless reference to ~/Theme/dark/style.css, that was for using the "tablesorter.js", no used anymore. * Web.config: Trying to have all the Index pages to work...
11 years ago
MembershipUserCollection users =
Membership.FindUsersByName (model.Username);
12 years ago
if (users.Count > 0) {
11 years ago
MembershipUser user = Membership.GetUser (model.Username, true);
12 years ago
changePasswordSucceeded = user.ChangePassword (model.OldPassword, model.NewPassword);
} else {
changePasswordSucceeded = false;
ModelState.AddModelError ("Username", "The user name not found.");
12 years ago
}
} catch (Exception ex) {
ViewData ["Error"] = ex.ToString ();
12 years ago
}
if (changePasswordSucceeded) {
return RedirectToAction ("ChangePasswordSuccess");
} else {
ModelState.AddModelError ("Password", "The current password is incorrect or the new password is invalid.");
}
}
// If we got this far, something failed, redisplay form
return View (model);
}
/// <summary>
/// Profile the specified id.
/// </summary>
/// <param name="id">Identifier.</param>
[Authorize]
[HttpGet]
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
10 years ago
public ActionResult Profile (string id)
{
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
10 years ago
if (id == null)
id = Membership.GetUser ().UserName;
ViewData ["UserName"] = id;
Implemente la gestion des activités * Activities.aspx: implémente la vue Html de la liste éditable des activités * Activity.ascx: implémente la vue Html d'une activité * NpgsqlContentProvider.cs: implemente la gestion des activités côté base de donnée Npgsql * TestAPI.csproj: ... une référence au framework 4.5.1 en moins ... * FrontOfficeController.cs: Le contrôleur du FrontOffice gére les activités * Global.asax.cs: nettoyage du code * activity.sql: Typo corrigée sur le terme "MEACode" * style.css: enlève des images qui n'ont plus rien à faire ici, tant ce fichier concerne maintenant uniquement la disposition ou les éléments de base. * AccountController.cs: implémente le contrôle par l'utilisateur du paramêtre de l'activité principale associé à son profile. * FrontOfficeController.cs: Implemente le contrôle de la page des activités, et simplifie le contrôle de la page des compétences. * HomeController.cs: formattage du code * ModuleController.cs: inutilisé * App.master: Theming explicite en page maître * Profile.aspx: Propose maintenant l'édition de l'activité principalement éxercée * Skills.aspx: supprime une ligne de log * Index.aspx: RAZ en home page * MarkdownDeep.dll: remplace le tag englobant les transformations, il était un "<p>", il est maintenant un "<span>". * BlogManager.cs: refactorisation * Activity.cs: implémente un type de commande à associer à une activité. * LocalizedText.fr.resx: * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: La traduction de "ne pas publier mon activité" * LocalizedText.resx: La traduction de "ne pas publier mon activité", et de "Votre activité" * ManagerHelper.cs: refabrique l'instanciation des fournisseurs du workflow, pour avoir une liste de toutes les activité prises en charges par tous les fournisseurs de contenu. * Profile.cs: Implement le code activité de l'objet `Profile` * ProfileEdition.cs: xmldoc * SkillManager.cs: Formattage du code source * IContentProvider.cs: reformattage du code+ propriété "Name" du fournisseur + definition des methodes relatives à la gestion des activités * WorkFlowManager.cs: Methodes de recupperation des activités fournies auprés des fournisseurs de contenu * YavscModel.csproj: renommage * Web.csproj: reference les nouveaux éléments du projet relatifs au activités * Web.config: references manquante en cas d'utilisation du paramértrage global du thème via la section system.web/pages du fichier de configuration.
10 years ago
Many fixes * Profile.aspx: * ProfileEdition.cs: Fixes the username modification * Book-next.aspx: pollution * NpgsqlMembershipProvider.cs: xmldoc * NpgsqlProfileProvider.cs: use default values from configuration * NpgsqlUserNameProvider.cs: Fixes the username detection * test-domain-TestAPI.config: profile dates must be returned as DateTime * instdbws.sql: The conversion to a valid .Net DateTime requires a credible date time as source value, the null one is not supported. * style.css: Fixes the new notification style * AccountController.cs: Fixes the profile edition. Now using the anti forgery key at login time * Book.aspx: * LocalizedText.resx: * LocalizedText.fr.resx: * CalendarApi.cs: * GoogleController.cs: * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: WIP booking * HomeController.cs: code prettying * Global.asax.cs: Limits the usage of titles in a route to the blog controller * OAuth2.cs: Profile values may be of type DBNull ... * T.cs: All translated strings will be Html encoded, as expected from an html helper * YavscHelpers.cs: A new method to build a javascript string... * App.master: * AppAdmin.master: Notification.body is now a js string literal * NoLogin.master: sync with the true master * Login.aspx: Permits the anti forgery key usage * Estimate.aspx: refactoring * Web.config: Fixes a later commit on the catalog name space * Web.csproj: An ajax helper to notify * ChangePasswordModel.cs: * RegisterClientModel.cs: A regexp for user name * LoginModel.cs: A regexp for user name and password * Profile.cs: A regexp for user name, and profile usage fixes * UserManager.cs: Checks for username availability before trying to modify it * YavscModel.csproj: `ProfileEdition` class addition * ChangeLog: should not be indexed * ChangeLog: useless here * ValidateAjaxAttribute.cs: Fixes usage of HtmlFieldPrefix * BookQuery.cs: Start, end hour and role are required * OtherWebException.cs: useless
10 years ago
ProfileEdition model = new ProfileEdition (ProfileBase.Create (id));
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
10 years ago
model.RememberMe = FormsAuthentication.GetAuthCookie (id, true) == null;
Implemente la gestion des activités * Activities.aspx: implémente la vue Html de la liste éditable des activités * Activity.ascx: implémente la vue Html d'une activité * NpgsqlContentProvider.cs: implemente la gestion des activités côté base de donnée Npgsql * TestAPI.csproj: ... une référence au framework 4.5.1 en moins ... * FrontOfficeController.cs: Le contrôleur du FrontOffice gére les activités * Global.asax.cs: nettoyage du code * activity.sql: Typo corrigée sur le terme "MEACode" * style.css: enlève des images qui n'ont plus rien à faire ici, tant ce fichier concerne maintenant uniquement la disposition ou les éléments de base. * AccountController.cs: implémente le contrôle par l'utilisateur du paramêtre de l'activité principale associé à son profile. * FrontOfficeController.cs: Implemente le contrôle de la page des activités, et simplifie le contrôle de la page des compétences. * HomeController.cs: formattage du code * ModuleController.cs: inutilisé * App.master: Theming explicite en page maître * Profile.aspx: Propose maintenant l'édition de l'activité principalement éxercée * Skills.aspx: supprime une ligne de log * Index.aspx: RAZ en home page * MarkdownDeep.dll: remplace le tag englobant les transformations, il était un "<p>", il est maintenant un "<span>". * BlogManager.cs: refactorisation * Activity.cs: implémente un type de commande à associer à une activité. * LocalizedText.fr.resx: * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: La traduction de "ne pas publier mon activité" * LocalizedText.resx: La traduction de "ne pas publier mon activité", et de "Votre activité" * ManagerHelper.cs: refabrique l'instanciation des fournisseurs du workflow, pour avoir une liste de toutes les activité prises en charges par tous les fournisseurs de contenu. * Profile.cs: Implement le code activité de l'objet `Profile` * ProfileEdition.cs: xmldoc * SkillManager.cs: Formattage du code source * IContentProvider.cs: reformattage du code+ propriété "Name" du fournisseur + definition des methodes relatives à la gestion des activités * WorkFlowManager.cs: Methodes de recupperation des activités fournies auprés des fournisseurs de contenu * YavscModel.csproj: renommage * Web.csproj: reference les nouveaux éléments du projet relatifs au activités * Web.config: references manquante en cas d'utilisation du paramértrage global du thème via la section system.web/pages du fichier de configuration.
10 years ago
SetMEACodeViewData (model);
SetUIThemeViewData (model);
return View (model);
}
private void SetUIThemeViewData(Profile model) {
ViewData ["UITheme"] = YavscHelpers.AvailableThemes.Select (
x => new SelectListItem () { Selected =
model.UITheme == x, Text = x, Value = x }).ToArray();
}
Implemente la gestion des activités * Activities.aspx: implémente la vue Html de la liste éditable des activités * Activity.ascx: implémente la vue Html d'une activité * NpgsqlContentProvider.cs: implemente la gestion des activités côté base de donnée Npgsql * TestAPI.csproj: ... une référence au framework 4.5.1 en moins ... * FrontOfficeController.cs: Le contrôleur du FrontOffice gére les activités * Global.asax.cs: nettoyage du code * activity.sql: Typo corrigée sur le terme "MEACode" * style.css: enlève des images qui n'ont plus rien à faire ici, tant ce fichier concerne maintenant uniquement la disposition ou les éléments de base. * AccountController.cs: implémente le contrôle par l'utilisateur du paramêtre de l'activité principale associé à son profile. * FrontOfficeController.cs: Implemente le contrôle de la page des activités, et simplifie le contrôle de la page des compétences. * HomeController.cs: formattage du code * ModuleController.cs: inutilisé * App.master: Theming explicite en page maître * Profile.aspx: Propose maintenant l'édition de l'activité principalement éxercée * Skills.aspx: supprime une ligne de log * Index.aspx: RAZ en home page * MarkdownDeep.dll: remplace le tag englobant les transformations, il était un "<p>", il est maintenant un "<span>". * BlogManager.cs: refactorisation * Activity.cs: implémente un type de commande à associer à une activité. * LocalizedText.fr.resx: * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: La traduction de "ne pas publier mon activité" * LocalizedText.resx: La traduction de "ne pas publier mon activité", et de "Votre activité" * ManagerHelper.cs: refabrique l'instanciation des fournisseurs du workflow, pour avoir une liste de toutes les activité prises en charges par tous les fournisseurs de contenu. * Profile.cs: Implement le code activité de l'objet `Profile` * ProfileEdition.cs: xmldoc * SkillManager.cs: Formattage du code source * IContentProvider.cs: reformattage du code+ propriété "Name" du fournisseur + definition des methodes relatives à la gestion des activités * WorkFlowManager.cs: Methodes de recupperation des activités fournies auprés des fournisseurs de contenu * YavscModel.csproj: renommage * Web.csproj: reference les nouveaux éléments du projet relatifs au activités * Web.config: references manquante en cas d'utilisation du paramértrage global du thème via la section system.web/pages du fichier de configuration.
10 years ago
private void SetMEACodeViewData(Profile model) {
var activities = WorkFlowManager.FindActivity ("%", false);
var items = new List<SelectListItem> ();
Implémente un formulaire simple de réservation d'un préstataire * p8-av4.xxs.jpg: * p8-av4.xxs.png: inutile * NoLogin.master: * Entity.cs: * OAuth2.cs: * ApiClient.cs: * PeopleApi.cs: * MapTracks.cs: * SkillManager.cs: * Skills.aspx: * EntityQuery.cs: * CalendarApi.cs: * SimpleJsonPostMethod.cs: * GoogleHelpers.cs: * EventPub.aspx: * GoogleController.cs: * Notification.cs: * UserSkills.aspx: * BackOfficeController.cs: * BackOfficeController.cs: * Notification.cs: * MessageWithPayLoad.cs: * MessageWithPayloadResponse.cs: refabrication * IContentProvider.cs: * NpgsqlBlogProvider.cs: xml doc * NpgsqlContentProvider.cs: implemente un listing des prestataire du code APE en base. * NpgsqlSkillProvider.cs: implemente un listing des domaines de compétence du préstataire en base. * XmlCatalogProvider.cs: Le catalogue de vente implémente mainenant l'interface d'un fournisseur de donnée comme les autres. Il pourrait par exemple vouloir définir des activité et des compétences. Pour l'instant, il n'est pas activé par la configuration, et reste le fournisseur du catalogue legacy (voir </FrontOffice/Catalog> ). * FrontOfficeController.cs: format du code * Global.asax.cs: Une route customisée pour le Front Office : /do (genre, ici, ça bouge.) * activity.sql: implémente en base de donnée le modèle des activités et compétences, ajoute aussi deux activités : l'edition logicielle et "Artiste" * style.css: changement de mes images de fond ... tombées du camion de Xavier et onlinehome.us * p8-av4.s.jpg: changement de taille * AccountController.cs: Met le code MEA à "none" quand il est spécifié non disponible. * BlogsController.cs: fixe un bug de l'edition d'un billet * FrontOfficeController.cs: implemente le contrôle booking simple * HomeController.cs: ajoute l'assemblage du catalog dans le listing dédié * YavscAjaxHelper.cs: Implemente un outil de representation JSon des objets côté serveur * parallax.js: deux fois plus de mouvement autout de x dans le parallax * yavsc.rate.js: imlemente un callback JS pour le rating * Activities.aspx: Des labels au formulaire de déclaration des activités * Activity.ascx: un panneau activité descent * Booking.aspx: implemente l'UI web du booking simple. * EavyBooking.aspx: refabrication du booking lourd * Index.aspx: supprime le panneau du tag Accueil, affiche les activités en cours du site (avec au moins un préstataire valide pour cette activité) * Web.config: Implemente une cote utilisateur, par une nouvelle valeur de son profile (Rate). * Yavsc.csproj: refabrique du code API Google, qui part dans le model. * MarkdownDeep.dll: le tag <p> ne convenait pas, le remplacer par le tag <span> non plus. Maintenant ça devrait être correct, c'est un div, mais que en cas de tag englobant non défini. * BookingQuery.cs: Le booking lourd devient une commande basée sur des activités concernée par l'intervention * ChangeLog: nettoyage * CatalogProvider.cs: implemente l'interface d'un fournissseur de contenu * PerformerProfile.cs: implemente le profile prestataire * SimpleBookingQuery.cs: Les besoin sont exprimé sous forme d'un tableau de valeur du parametrage de la commande * LocalizedText.resx: * LocalizedText.fr.resx: * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: internationalisation * Profile.cs: implemente un accès à l'id d'enregistrement Google GCM * SkillEntity.cs: La compétence appartient à un domaine d'activité, on lui associe un et un seul code APE * SkillProvider.cs: Fait chercher les compétences à partir d'un code activité * WorkFlowManager.cs: implemente l'accès à la liste des préstataires de telle activité * YavscModel.csproj: refabrications * Skills.sql: vient de passer dans activity.Sql * T.cs: la traduction est faite plus simple à appeler (sans cast vers `string`).
10 years ago
items.Add (new SelectListItem () { Selected = model.MEACode == null, Text = LocalizedText.DoNotPublishMyActivity, Value="none" });
Implemente la gestion des activités * Activities.aspx: implémente la vue Html de la liste éditable des activités * Activity.ascx: implémente la vue Html d'une activité * NpgsqlContentProvider.cs: implemente la gestion des activités côté base de donnée Npgsql * TestAPI.csproj: ... une référence au framework 4.5.1 en moins ... * FrontOfficeController.cs: Le contrôleur du FrontOffice gére les activités * Global.asax.cs: nettoyage du code * activity.sql: Typo corrigée sur le terme "MEACode" * style.css: enlève des images qui n'ont plus rien à faire ici, tant ce fichier concerne maintenant uniquement la disposition ou les éléments de base. * AccountController.cs: implémente le contrôle par l'utilisateur du paramêtre de l'activité principale associé à son profile. * FrontOfficeController.cs: Implemente le contrôle de la page des activités, et simplifie le contrôle de la page des compétences. * HomeController.cs: formattage du code * ModuleController.cs: inutilisé * App.master: Theming explicite en page maître * Profile.aspx: Propose maintenant l'édition de l'activité principalement éxercée * Skills.aspx: supprime une ligne de log * Index.aspx: RAZ en home page * MarkdownDeep.dll: remplace le tag englobant les transformations, il était un "<p>", il est maintenant un "<span>". * BlogManager.cs: refactorisation * Activity.cs: implémente un type de commande à associer à une activité. * LocalizedText.fr.resx: * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: La traduction de "ne pas publier mon activité" * LocalizedText.resx: La traduction de "ne pas publier mon activité", et de "Votre activité" * ManagerHelper.cs: refabrique l'instanciation des fournisseurs du workflow, pour avoir une liste de toutes les activité prises en charges par tous les fournisseurs de contenu. * Profile.cs: Implement le code activité de l'objet `Profile` * ProfileEdition.cs: xmldoc * SkillManager.cs: Formattage du code source * IContentProvider.cs: reformattage du code+ propriété "Name" du fournisseur + definition des methodes relatives à la gestion des activités * WorkFlowManager.cs: Methodes de recupperation des activités fournies auprés des fournisseurs de contenu * YavscModel.csproj: renommage * Web.csproj: reference les nouveaux éléments du projet relatifs au activités * Web.config: references manquante en cas d'utilisation du paramértrage global du thème via la section system.web/pages du fichier de configuration.
10 years ago
foreach (var a in activities) {
items.Add(new SelectListItem() { Selected = model.MEACode == a.Id,
Text = string.Format("{1} : {0}",a.Title,a.Id),
Value = a.Id });
}
ViewData ["MEACode"] = items;
}
/// <summary>
/// Profile the specified id, model and AvatarFile.
/// </summary>
/// <param name="id">Identifier.</param>
/// <param name="model">Model.</param>
/// <param name="AvatarFile">Avatar file.</param>
[Authorize]
[HttpPost]
Many fixes * Profile.aspx: * ProfileEdition.cs: Fixes the username modification * Book-next.aspx: pollution * NpgsqlMembershipProvider.cs: xmldoc * NpgsqlProfileProvider.cs: use default values from configuration * NpgsqlUserNameProvider.cs: Fixes the username detection * test-domain-TestAPI.config: profile dates must be returned as DateTime * instdbws.sql: The conversion to a valid .Net DateTime requires a credible date time as source value, the null one is not supported. * style.css: Fixes the new notification style * AccountController.cs: Fixes the profile edition. Now using the anti forgery key at login time * Book.aspx: * LocalizedText.resx: * LocalizedText.fr.resx: * CalendarApi.cs: * GoogleController.cs: * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: WIP booking * HomeController.cs: code prettying * Global.asax.cs: Limits the usage of titles in a route to the blog controller * OAuth2.cs: Profile values may be of type DBNull ... * T.cs: All translated strings will be Html encoded, as expected from an html helper * YavscHelpers.cs: A new method to build a javascript string... * App.master: * AppAdmin.master: Notification.body is now a js string literal * NoLogin.master: sync with the true master * Login.aspx: Permits the anti forgery key usage * Estimate.aspx: refactoring * Web.config: Fixes a later commit on the catalog name space * Web.csproj: An ajax helper to notify * ChangePasswordModel.cs: * RegisterClientModel.cs: A regexp for user name * LoginModel.cs: A regexp for user name and password * Profile.cs: A regexp for user name, and profile usage fixes * UserManager.cs: Checks for username availability before trying to modify it * YavscModel.csproj: `ProfileEdition` class addition * ChangeLog: should not be indexed * ChangeLog: useless here * ValidateAjaxAttribute.cs: Fixes usage of HtmlFieldPrefix * BookQuery.cs: Start, end hour and role are required * OtherWebException.cs: useless
10 years ago
public ActionResult Profile (string id, ProfileEdition model, HttpPostedFileBase AvatarFile)
12 years ago
{
Many fixes * Profile.aspx: * ProfileEdition.cs: Fixes the username modification * Book-next.aspx: pollution * NpgsqlMembershipProvider.cs: xmldoc * NpgsqlProfileProvider.cs: use default values from configuration * NpgsqlUserNameProvider.cs: Fixes the username detection * test-domain-TestAPI.config: profile dates must be returned as DateTime * instdbws.sql: The conversion to a valid .Net DateTime requires a credible date time as source value, the null one is not supported. * style.css: Fixes the new notification style * AccountController.cs: Fixes the profile edition. Now using the anti forgery key at login time * Book.aspx: * LocalizedText.resx: * LocalizedText.fr.resx: * CalendarApi.cs: * GoogleController.cs: * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: WIP booking * HomeController.cs: code prettying * Global.asax.cs: Limits the usage of titles in a route to the blog controller * OAuth2.cs: Profile values may be of type DBNull ... * T.cs: All translated strings will be Html encoded, as expected from an html helper * YavscHelpers.cs: A new method to build a javascript string... * App.master: * AppAdmin.master: Notification.body is now a js string literal * NoLogin.master: sync with the true master * Login.aspx: Permits the anti forgery key usage * Estimate.aspx: refactoring * Web.config: Fixes a later commit on the catalog name space * Web.csproj: An ajax helper to notify * ChangePasswordModel.cs: * RegisterClientModel.cs: A regexp for user name * LoginModel.cs: A regexp for user name and password * Profile.cs: A regexp for user name, and profile usage fixes * UserManager.cs: Checks for username availability before trying to modify it * YavscModel.csproj: `ProfileEdition` class addition * ChangeLog: should not be indexed * ChangeLog: useless here * ValidateAjaxAttribute.cs: Fixes usage of HtmlFieldPrefix * BookQuery.cs: Start, end hour and role are required * OtherWebException.cs: useless
10 years ago
string logdu = User.Identity.Name;
if (string.IsNullOrWhiteSpace (id)) {
if (string.IsNullOrWhiteSpace (model.UserName)) {
model.UserName = logdu;
return View (model);
} else {
id = logdu;
}
}
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
10 years ago
ViewData ["UserName"] = id;
Many fixes * Profile.aspx: * ProfileEdition.cs: Fixes the username modification * Book-next.aspx: pollution * NpgsqlMembershipProvider.cs: xmldoc * NpgsqlProfileProvider.cs: use default values from configuration * NpgsqlUserNameProvider.cs: Fixes the username detection * test-domain-TestAPI.config: profile dates must be returned as DateTime * instdbws.sql: The conversion to a valid .Net DateTime requires a credible date time as source value, the null one is not supported. * style.css: Fixes the new notification style * AccountController.cs: Fixes the profile edition. Now using the anti forgery key at login time * Book.aspx: * LocalizedText.resx: * LocalizedText.fr.resx: * CalendarApi.cs: * GoogleController.cs: * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: WIP booking * HomeController.cs: code prettying * Global.asax.cs: Limits the usage of titles in a route to the blog controller * OAuth2.cs: Profile values may be of type DBNull ... * T.cs: All translated strings will be Html encoded, as expected from an html helper * YavscHelpers.cs: A new method to build a javascript string... * App.master: * AppAdmin.master: Notification.body is now a js string literal * NoLogin.master: sync with the true master * Login.aspx: Permits the anti forgery key usage * Estimate.aspx: refactoring * Web.config: Fixes a later commit on the catalog name space * Web.csproj: An ajax helper to notify * ChangePasswordModel.cs: * RegisterClientModel.cs: A regexp for user name * LoginModel.cs: A regexp for user name and password * Profile.cs: A regexp for user name, and profile usage fixes * UserManager.cs: Checks for username availability before trying to modify it * YavscModel.csproj: `ProfileEdition` class addition * ChangeLog: should not be indexed * ChangeLog: useless here * ValidateAjaxAttribute.cs: Fixes usage of HtmlFieldPrefix * BookQuery.cs: Start, end hour and role are required * OtherWebException.cs: useless
10 years ago
bool editsTheUserName = model.NewUserName!=null&&(string.Compare(id,model.NewUserName)!=0);
// Checks authorisation
if (logdu!=id)
if (!Roles.IsUserInRole ("Admin"))
if (!Roles.IsUserInRole ("FrontOffice"))
throw new UnauthorizedAccessException ("Your are not authorized to modify this profile");
Many fixes * Profile.aspx: * ProfileEdition.cs: Fixes the username modification * Book-next.aspx: pollution * NpgsqlMembershipProvider.cs: xmldoc * NpgsqlProfileProvider.cs: use default values from configuration * NpgsqlUserNameProvider.cs: Fixes the username detection * test-domain-TestAPI.config: profile dates must be returned as DateTime * instdbws.sql: The conversion to a valid .Net DateTime requires a credible date time as source value, the null one is not supported. * style.css: Fixes the new notification style * AccountController.cs: Fixes the profile edition. Now using the anti forgery key at login time * Book.aspx: * LocalizedText.resx: * LocalizedText.fr.resx: * CalendarApi.cs: * GoogleController.cs: * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: WIP booking * HomeController.cs: code prettying * Global.asax.cs: Limits the usage of titles in a route to the blog controller * OAuth2.cs: Profile values may be of type DBNull ... * T.cs: All translated strings will be Html encoded, as expected from an html helper * YavscHelpers.cs: A new method to build a javascript string... * App.master: * AppAdmin.master: Notification.body is now a js string literal * NoLogin.master: sync with the true master * Login.aspx: Permits the anti forgery key usage * Estimate.aspx: refactoring * Web.config: Fixes a later commit on the catalog name space * Web.csproj: An ajax helper to notify * ChangePasswordModel.cs: * RegisterClientModel.cs: A regexp for user name * LoginModel.cs: A regexp for user name and password * Profile.cs: A regexp for user name, and profile usage fixes * UserManager.cs: Checks for username availability before trying to modify it * YavscModel.csproj: `ProfileEdition` class addition * ChangeLog: should not be indexed * ChangeLog: useless here * ValidateAjaxAttribute.cs: Fixes usage of HtmlFieldPrefix * BookQuery.cs: Start, end hour and role are required * OtherWebException.cs: useless
10 years ago
// checks availability of a new username
if (editsTheUserName)
if (!UserManager.IsAvailable (model.NewUserName))
ModelState.AddModelError ("UserName",
string.Format (
LocalizedText.DuplicateUserName,
model.NewUserName
));
if (AvatarFile != null) {
// if said valid, move as avatar file
// else invalidate the model
12 years ago
if (AvatarFile.ContentType == "image/png") {
string avdir = Server.MapPath (YavscHelpers.AvatarDir);
var di = new DirectoryInfo (avdir);
if (!di.Exists)
di.Create ();
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
10 years ago
string avpath = Path.Combine (avdir, id + ".png");
12 years ago
AvatarFile.SaveAs (avpath);
model.avatar = Url.Content( YavscHelpers.AvatarDir + "/" + id + ".png");
} else
12 years ago
ModelState.AddModelError ("Avatar",
string.Format ("Image type {0} is not supported (suported formats : {1})",
AvatarFile.ContentType, "image/png"));
12 years ago
}
if (ModelState.IsValid) {
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
10 years ago
ProfileBase prf = ProfileBase .Create (id);
prf.SetPropertyValue ("Name", model.Name);
prf.SetPropertyValue ("BlogVisible", model.BlogVisible);
prf.SetPropertyValue ("BlogTitle", model.BlogTitle);
if (AvatarFile != null) {
prf.SetPropertyValue ("Avatar", model.avatar);
} else {
var av = prf.GetPropertyValue ("Avatar");
if (av != null)
model.avatar = av as string;
}
prf.SetPropertyValue ("Address", model.Address);
prf.SetPropertyValue ("CityAndState", model.CityAndState);
prf.SetPropertyValue ("Country", model.Country);
prf.SetPropertyValue ("ZipCode", model.ZipCode);
prf.SetPropertyValue ("WebSite", model.WebSite);
prf.SetPropertyValue ("Name", model.Name);
prf.SetPropertyValue ("Phone", model.Phone);
prf.SetPropertyValue ("Mobile", model.Mobile);
prf.SetPropertyValue ("BankCode", model.BankCode);
prf.SetPropertyValue ("IBAN", model.IBAN);
prf.SetPropertyValue ("BIC", model.BIC);
prf.SetPropertyValue ("WicketCode", model.WicketCode);
prf.SetPropertyValue ("AccountNumber", model.AccountNumber);
prf.SetPropertyValue ("BankedKey", model.BankedKey);
prf.SetPropertyValue ("gcalid", model.GoogleCalendar);
prf.SetPropertyValue ("UITheme", model.UITheme);
Implemente la gestion des activités * Activities.aspx: implémente la vue Html de la liste éditable des activités * Activity.ascx: implémente la vue Html d'une activité * NpgsqlContentProvider.cs: implemente la gestion des activités côté base de donnée Npgsql * TestAPI.csproj: ... une référence au framework 4.5.1 en moins ... * FrontOfficeController.cs: Le contrôleur du FrontOffice gére les activités * Global.asax.cs: nettoyage du code * activity.sql: Typo corrigée sur le terme "MEACode" * style.css: enlève des images qui n'ont plus rien à faire ici, tant ce fichier concerne maintenant uniquement la disposition ou les éléments de base. * AccountController.cs: implémente le contrôle par l'utilisateur du paramêtre de l'activité principale associé à son profile. * FrontOfficeController.cs: Implemente le contrôle de la page des activités, et simplifie le contrôle de la page des compétences. * HomeController.cs: formattage du code * ModuleController.cs: inutilisé * App.master: Theming explicite en page maître * Profile.aspx: Propose maintenant l'édition de l'activité principalement éxercée * Skills.aspx: supprime une ligne de log * Index.aspx: RAZ en home page * MarkdownDeep.dll: remplace le tag englobant les transformations, il était un "<p>", il est maintenant un "<span>". * BlogManager.cs: refactorisation * Activity.cs: implémente un type de commande à associer à une activité. * LocalizedText.fr.resx: * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: La traduction de "ne pas publier mon activité" * LocalizedText.resx: La traduction de "ne pas publier mon activité", et de "Votre activité" * ManagerHelper.cs: refabrique l'instanciation des fournisseurs du workflow, pour avoir une liste de toutes les activité prises en charges par tous les fournisseurs de contenu. * Profile.cs: Implement le code activité de l'objet `Profile` * ProfileEdition.cs: xmldoc * SkillManager.cs: Formattage du code source * IContentProvider.cs: reformattage du code+ propriété "Name" du fournisseur + definition des methodes relatives à la gestion des activités * WorkFlowManager.cs: Methodes de recupperation des activités fournies auprés des fournisseurs de contenu * YavscModel.csproj: renommage * Web.csproj: reference les nouveaux éléments du projet relatifs au activités * Web.config: references manquante en cas d'utilisation du paramértrage global du thème via la section system.web/pages du fichier de configuration.
10 years ago
prf.SetPropertyValue ("MEACode", model.MEACode);
prf.Save ();
Many fixes * Profile.aspx: * ProfileEdition.cs: Fixes the username modification * Book-next.aspx: pollution * NpgsqlMembershipProvider.cs: xmldoc * NpgsqlProfileProvider.cs: use default values from configuration * NpgsqlUserNameProvider.cs: Fixes the username detection * test-domain-TestAPI.config: profile dates must be returned as DateTime * instdbws.sql: The conversion to a valid .Net DateTime requires a credible date time as source value, the null one is not supported. * style.css: Fixes the new notification style * AccountController.cs: Fixes the profile edition. Now using the anti forgery key at login time * Book.aspx: * LocalizedText.resx: * LocalizedText.fr.resx: * CalendarApi.cs: * GoogleController.cs: * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: WIP booking * HomeController.cs: code prettying * Global.asax.cs: Limits the usage of titles in a route to the blog controller * OAuth2.cs: Profile values may be of type DBNull ... * T.cs: All translated strings will be Html encoded, as expected from an html helper * YavscHelpers.cs: A new method to build a javascript string... * App.master: * AppAdmin.master: Notification.body is now a js string literal * NoLogin.master: sync with the true master * Login.aspx: Permits the anti forgery key usage * Estimate.aspx: refactoring * Web.config: Fixes a later commit on the catalog name space * Web.csproj: An ajax helper to notify * ChangePasswordModel.cs: * RegisterClientModel.cs: A regexp for user name * LoginModel.cs: A regexp for user name and password * Profile.cs: A regexp for user name, and profile usage fixes * UserManager.cs: Checks for username availability before trying to modify it * YavscModel.csproj: `ProfileEdition` class addition * ChangeLog: should not be indexed * ChangeLog: useless here * ValidateAjaxAttribute.cs: Fixes usage of HtmlFieldPrefix * BookQuery.cs: Start, end hour and role are required * OtherWebException.cs: useless
10 years ago
if (editsTheUserName) {
UserManager.ChangeName (id, model.NewUserName);
FormsAuthentication.SetAuthCookie (model.NewUserName, model.RememberMe);
model.UserName = model.NewUserName;
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
10 years ago
}
Many fixes * Profile.aspx: * ProfileEdition.cs: Fixes the username modification * Book-next.aspx: pollution * NpgsqlMembershipProvider.cs: xmldoc * NpgsqlProfileProvider.cs: use default values from configuration * NpgsqlUserNameProvider.cs: Fixes the username detection * test-domain-TestAPI.config: profile dates must be returned as DateTime * instdbws.sql: The conversion to a valid .Net DateTime requires a credible date time as source value, the null one is not supported. * style.css: Fixes the new notification style * AccountController.cs: Fixes the profile edition. Now using the anti forgery key at login time * Book.aspx: * LocalizedText.resx: * LocalizedText.fr.resx: * CalendarApi.cs: * GoogleController.cs: * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: WIP booking * HomeController.cs: code prettying * Global.asax.cs: Limits the usage of titles in a route to the blog controller * OAuth2.cs: Profile values may be of type DBNull ... * T.cs: All translated strings will be Html encoded, as expected from an html helper * YavscHelpers.cs: A new method to build a javascript string... * App.master: * AppAdmin.master: Notification.body is now a js string literal * NoLogin.master: sync with the true master * Login.aspx: Permits the anti forgery key usage * Estimate.aspx: refactoring * Web.config: Fixes a later commit on the catalog name space * Web.csproj: An ajax helper to notify * ChangePasswordModel.cs: * RegisterClientModel.cs: A regexp for user name * LoginModel.cs: A regexp for user name and password * Profile.cs: A regexp for user name, and profile usage fixes * UserManager.cs: Checks for username availability before trying to modify it * YavscModel.csproj: `ProfileEdition` class addition * ChangeLog: should not be indexed * ChangeLog: useless here * ValidateAjaxAttribute.cs: Fixes usage of HtmlFieldPrefix * BookQuery.cs: Start, end hour and role are required * OtherWebException.cs: useless
10 years ago
YavscHelpers.Notify(ViewData, "Profile enregistré"+((editsTheUserName)?", nom public inclu.":""));
11 years ago
}
Implemente la gestion des activités * Activities.aspx: implémente la vue Html de la liste éditable des activités * Activity.ascx: implémente la vue Html d'une activité * NpgsqlContentProvider.cs: implemente la gestion des activités côté base de donnée Npgsql * TestAPI.csproj: ... une référence au framework 4.5.1 en moins ... * FrontOfficeController.cs: Le contrôleur du FrontOffice gére les activités * Global.asax.cs: nettoyage du code * activity.sql: Typo corrigée sur le terme "MEACode" * style.css: enlève des images qui n'ont plus rien à faire ici, tant ce fichier concerne maintenant uniquement la disposition ou les éléments de base. * AccountController.cs: implémente le contrôle par l'utilisateur du paramêtre de l'activité principale associé à son profile. * FrontOfficeController.cs: Implemente le contrôle de la page des activités, et simplifie le contrôle de la page des compétences. * HomeController.cs: formattage du code * ModuleController.cs: inutilisé * App.master: Theming explicite en page maître * Profile.aspx: Propose maintenant l'édition de l'activité principalement éxercée * Skills.aspx: supprime une ligne de log * Index.aspx: RAZ en home page * MarkdownDeep.dll: remplace le tag englobant les transformations, il était un "<p>", il est maintenant un "<span>". * BlogManager.cs: refactorisation * Activity.cs: implémente un type de commande à associer à une activité. * LocalizedText.fr.resx: * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: La traduction de "ne pas publier mon activité" * LocalizedText.resx: La traduction de "ne pas publier mon activité", et de "Votre activité" * ManagerHelper.cs: refabrique l'instanciation des fournisseurs du workflow, pour avoir une liste de toutes les activité prises en charges par tous les fournisseurs de contenu. * Profile.cs: Implement le code activité de l'objet `Profile` * ProfileEdition.cs: xmldoc * SkillManager.cs: Formattage du code source * IContentProvider.cs: reformattage du code+ propriété "Name" du fournisseur + definition des methodes relatives à la gestion des activités * WorkFlowManager.cs: Methodes de recupperation des activités fournies auprés des fournisseurs de contenu * YavscModel.csproj: renommage * Web.csproj: reference les nouveaux éléments du projet relatifs au activités * Web.config: references manquante en cas d'utilisation du paramértrage global du thème via la section system.web/pages du fichier de configuration.
10 years ago
SetMEACodeViewData (model);
SetUIThemeViewData (model);
return View (model);
12 years ago
}
11 years ago
/// <summary>
/// Circles this instance.
/// </summary>
[Authorize]
public ActionResult Circles ()
{
string user = Membership.GetUser ().UserName;
ViewData["Circles"] = CircleManager.DefaultProvider.List (user);
return View ();
11 years ago
}
/// <summary>
/// Logout the specified returnUrl.
/// </summary>
/// <param name="returnUrl">Return URL.</param>
12 years ago
[Authorize]
public ActionResult Logout (string returnUrl)
{
11 years ago
FormsAuthentication.SignOut ();
return Redirect (returnUrl);
12 years ago
}
* AccountController.cs: Register and reset passord from Web API * GCMController.cs: initial creation, will host GCM calls and related procedures. * ResetPassword.aspx: Html view to reset the password * LocalizedText.resx: * LocalizedText.fr.resx: new String form circles * Web.config: * Web.csproj: * YavscModel.csproj: * LocalizedText.Designer.cs: * Profile.cs: * Profile.cs: * LocalizedText.fr.Designer.cs: * LoginModel.cs: * Publishing.cs: * CalendarController.cs: * LoginModel.cs: * GCMRegister.cs: * Publishing.cs: * GCMRegister.cs: * NewRoleModel.cs: * NewRoleModel.cs: * RegisterModel.cs: * NewAdminModel.cs: * RegisterModel.cs: * NewAdminModel.cs: * LostPasswordModel.cs: * RegisterViewModel.cs: * RegisterViewModel.cs: * ProviderPublicInfo.cs: * RegisterClientModel.cs: * ChangePasswordModel.cs: * ProviderPublicInfo.cs: * RegisterClientModel.cs: * ChangePasswordModel.cs: Fixes a typo (in the namespace :-/) * NpgsqlCircleProvider.cs: Fixes the Circle creation * Global.asax.cs: * AdminController.cs: * NpgsqlContentProvider.cs: code formatting * BlogsController.cs: * CircleController.cs: * WorkFlowController.cs: * PaypalApiController.cs: * FrontOfficeController.cs: refactoring * AccountController.cs: Adds the way to reset the password * FrontOfficeController.cs: xml doc * T.cs: Make this class an helper to translation * YavscHelpers.cs: Implements the e-mail sending * style.css: style uniformization * Circles.aspx: Implements the Html interface to Circle creation (modifications and deletions are still to implement) * Register.ascx: Allows the error display in case of lack of power of the user at registering another user. * Estimate.aspx: use the partial view to register from the Account folder. Cleans the useless reference to ~/Theme/dark/style.css, that was for using the "tablesorter.js", no used anymore. * Web.config: Trying to have all the Index pages to work...
11 years ago
/// <summary>
/// Losts the password.
/// </summary>
/// <returns>The password.</returns>
/// <param name="model">Model.</param>
public ActionResult ResetPassword(LostPasswordModel model)
{
if (Request.HttpMethod == "POST") {
StringDictionary errors;
MembershipUser user;
YavscHelpers.ValidatePasswordReset (model, out errors, out user);
* AccountController.cs: Register and reset passord from Web API * GCMController.cs: initial creation, will host GCM calls and related procedures. * ResetPassword.aspx: Html view to reset the password * LocalizedText.resx: * LocalizedText.fr.resx: new String form circles * Web.config: * Web.csproj: * YavscModel.csproj: * LocalizedText.Designer.cs: * Profile.cs: * Profile.cs: * LocalizedText.fr.Designer.cs: * LoginModel.cs: * Publishing.cs: * CalendarController.cs: * LoginModel.cs: * GCMRegister.cs: * Publishing.cs: * GCMRegister.cs: * NewRoleModel.cs: * NewRoleModel.cs: * RegisterModel.cs: * NewAdminModel.cs: * RegisterModel.cs: * NewAdminModel.cs: * LostPasswordModel.cs: * RegisterViewModel.cs: * RegisterViewModel.cs: * ProviderPublicInfo.cs: * RegisterClientModel.cs: * ChangePasswordModel.cs: * ProviderPublicInfo.cs: * RegisterClientModel.cs: * ChangePasswordModel.cs: Fixes a typo (in the namespace :-/) * NpgsqlCircleProvider.cs: Fixes the Circle creation * Global.asax.cs: * AdminController.cs: * NpgsqlContentProvider.cs: code formatting * BlogsController.cs: * CircleController.cs: * WorkFlowController.cs: * PaypalApiController.cs: * FrontOfficeController.cs: refactoring * AccountController.cs: Adds the way to reset the password * FrontOfficeController.cs: xml doc * T.cs: Make this class an helper to translation * YavscHelpers.cs: Implements the e-mail sending * style.css: style uniformization * Circles.aspx: Implements the Html interface to Circle creation (modifications and deletions are still to implement) * Register.ascx: Allows the error display in case of lack of power of the user at registering another user. * Estimate.aspx: use the partial view to register from the Account folder. Cleans the useless reference to ~/Theme/dark/style.css, that was for using the "tablesorter.js", no used anymore. * Web.config: Trying to have all the Index pages to work...
11 years ago
foreach (string key in errors.Keys)
ModelState.AddModelError (key, errors [key]);
if (user != null && ModelState.IsValid)
Url.SendActivationMessage (user);
* AccountController.cs: Register and reset passord from Web API * GCMController.cs: initial creation, will host GCM calls and related procedures. * ResetPassword.aspx: Html view to reset the password * LocalizedText.resx: * LocalizedText.fr.resx: new String form circles * Web.config: * Web.csproj: * YavscModel.csproj: * LocalizedText.Designer.cs: * Profile.cs: * Profile.cs: * LocalizedText.fr.Designer.cs: * LoginModel.cs: * Publishing.cs: * CalendarController.cs: * LoginModel.cs: * GCMRegister.cs: * Publishing.cs: * GCMRegister.cs: * NewRoleModel.cs: * NewRoleModel.cs: * RegisterModel.cs: * NewAdminModel.cs: * RegisterModel.cs: * NewAdminModel.cs: * LostPasswordModel.cs: * RegisterViewModel.cs: * RegisterViewModel.cs: * ProviderPublicInfo.cs: * RegisterClientModel.cs: * ChangePasswordModel.cs: * ProviderPublicInfo.cs: * RegisterClientModel.cs: * ChangePasswordModel.cs: Fixes a typo (in the namespace :-/) * NpgsqlCircleProvider.cs: Fixes the Circle creation * Global.asax.cs: * AdminController.cs: * NpgsqlContentProvider.cs: code formatting * BlogsController.cs: * CircleController.cs: * WorkFlowController.cs: * PaypalApiController.cs: * FrontOfficeController.cs: refactoring * AccountController.cs: Adds the way to reset the password * FrontOfficeController.cs: xml doc * T.cs: Make this class an helper to translation * YavscHelpers.cs: Implements the e-mail sending * style.css: style uniformization * Circles.aspx: Implements the Html interface to Circle creation (modifications and deletions are still to implement) * Register.ascx: Allows the error display in case of lack of power of the user at registering another user. * Estimate.aspx: use the partial view to register from the Account folder. Cleans the useless reference to ~/Theme/dark/style.css, that was for using the "tablesorter.js", no used anymore. * Web.config: Trying to have all the Index pages to work...
11 years ago
}
return View (model);
}
/// <summary>
/// Validate the specified id and key.
/// </summary>
/// <param name="id">Identifier.</param>
/// <param name="key">Key.</param>
[HttpGet]
12 years ago
public ActionResult Validate (string id, string key)
{
MembershipUser u = Membership.GetUser (id, false);
if (u == null) {
YavscHelpers.Notify( ViewData,
string.Format ("Cet utilisateur n'existe pas ({0})", id));
11 years ago
} else if (u.ProviderUserKey.ToString () == key) {
* AccountController.cs: Register and reset passord from Web API * GCMController.cs: initial creation, will host GCM calls and related procedures. * ResetPassword.aspx: Html view to reset the password * LocalizedText.resx: * LocalizedText.fr.resx: new String form circles * Web.config: * Web.csproj: * YavscModel.csproj: * LocalizedText.Designer.cs: * Profile.cs: * Profile.cs: * LocalizedText.fr.Designer.cs: * LoginModel.cs: * Publishing.cs: * CalendarController.cs: * LoginModel.cs: * GCMRegister.cs: * Publishing.cs: * GCMRegister.cs: * NewRoleModel.cs: * NewRoleModel.cs: * RegisterModel.cs: * NewAdminModel.cs: * RegisterModel.cs: * NewAdminModel.cs: * LostPasswordModel.cs: * RegisterViewModel.cs: * RegisterViewModel.cs: * ProviderPublicInfo.cs: * RegisterClientModel.cs: * ChangePasswordModel.cs: * ProviderPublicInfo.cs: * RegisterClientModel.cs: * ChangePasswordModel.cs: Fixes a typo (in the namespace :-/) * NpgsqlCircleProvider.cs: Fixes the Circle creation * Global.asax.cs: * AdminController.cs: * NpgsqlContentProvider.cs: code formatting * BlogsController.cs: * CircleController.cs: * WorkFlowController.cs: * PaypalApiController.cs: * FrontOfficeController.cs: refactoring * AccountController.cs: Adds the way to reset the password * FrontOfficeController.cs: xml doc * T.cs: Make this class an helper to translation * YavscHelpers.cs: Implements the e-mail sending * style.css: style uniformization * Circles.aspx: Implements the Html interface to Circle creation (modifications and deletions are still to implement) * Register.ascx: Allows the error display in case of lack of power of the user at registering another user. * Estimate.aspx: use the partial view to register from the Account folder. Cleans the useless reference to ~/Theme/dark/style.css, that was for using the "tablesorter.js", no used anymore. * Web.config: Trying to have all the Index pages to work...
11 years ago
if (u.IsApproved) {
YavscHelpers.Notify( ViewData,
string.Format ("Votre compte ({0}) est déjà validé.", id));
* AccountController.cs: Register and reset passord from Web API * GCMController.cs: initial creation, will host GCM calls and related procedures. * ResetPassword.aspx: Html view to reset the password * LocalizedText.resx: * LocalizedText.fr.resx: new String form circles * Web.config: * Web.csproj: * YavscModel.csproj: * LocalizedText.Designer.cs: * Profile.cs: * Profile.cs: * LocalizedText.fr.Designer.cs: * LoginModel.cs: * Publishing.cs: * CalendarController.cs: * LoginModel.cs: * GCMRegister.cs: * Publishing.cs: * GCMRegister.cs: * NewRoleModel.cs: * NewRoleModel.cs: * RegisterModel.cs: * NewAdminModel.cs: * RegisterModel.cs: * NewAdminModel.cs: * LostPasswordModel.cs: * RegisterViewModel.cs: * RegisterViewModel.cs: * ProviderPublicInfo.cs: * RegisterClientModel.cs: * ChangePasswordModel.cs: * ProviderPublicInfo.cs: * RegisterClientModel.cs: * ChangePasswordModel.cs: Fixes a typo (in the namespace :-/) * NpgsqlCircleProvider.cs: Fixes the Circle creation * Global.asax.cs: * AdminController.cs: * NpgsqlContentProvider.cs: code formatting * BlogsController.cs: * CircleController.cs: * WorkFlowController.cs: * PaypalApiController.cs: * FrontOfficeController.cs: refactoring * AccountController.cs: Adds the way to reset the password * FrontOfficeController.cs: xml doc * T.cs: Make this class an helper to translation * YavscHelpers.cs: Implements the e-mail sending * style.css: style uniformization * Circles.aspx: Implements the Html interface to Circle creation (modifications and deletions are still to implement) * Register.ascx: Allows the error display in case of lack of power of the user at registering another user. * Estimate.aspx: use the partial view to register from the Account folder. Cleans the useless reference to ~/Theme/dark/style.css, that was for using the "tablesorter.js", no used anymore. * Web.config: Trying to have all the Index pages to work...
11 years ago
} else {
u.IsApproved = true;
Membership.UpdateUser (u);
YavscHelpers.Notify( ViewData,
string.Format ("La création de votre compte ({0}) est validée.", id));
* AccountController.cs: Register and reset passord from Web API * GCMController.cs: initial creation, will host GCM calls and related procedures. * ResetPassword.aspx: Html view to reset the password * LocalizedText.resx: * LocalizedText.fr.resx: new String form circles * Web.config: * Web.csproj: * YavscModel.csproj: * LocalizedText.Designer.cs: * Profile.cs: * Profile.cs: * LocalizedText.fr.Designer.cs: * LoginModel.cs: * Publishing.cs: * CalendarController.cs: * LoginModel.cs: * GCMRegister.cs: * Publishing.cs: * GCMRegister.cs: * NewRoleModel.cs: * NewRoleModel.cs: * RegisterModel.cs: * NewAdminModel.cs: * RegisterModel.cs: * NewAdminModel.cs: * LostPasswordModel.cs: * RegisterViewModel.cs: * RegisterViewModel.cs: * ProviderPublicInfo.cs: * RegisterClientModel.cs: * ChangePasswordModel.cs: * ProviderPublicInfo.cs: * RegisterClientModel.cs: * ChangePasswordModel.cs: Fixes a typo (in the namespace :-/) * NpgsqlCircleProvider.cs: Fixes the Circle creation * Global.asax.cs: * AdminController.cs: * NpgsqlContentProvider.cs: code formatting * BlogsController.cs: * CircleController.cs: * WorkFlowController.cs: * PaypalApiController.cs: * FrontOfficeController.cs: refactoring * AccountController.cs: Adds the way to reset the password * FrontOfficeController.cs: xml doc * T.cs: Make this class an helper to translation * YavscHelpers.cs: Implements the e-mail sending * style.css: style uniformization * Circles.aspx: Implements the Html interface to Circle creation (modifications and deletions are still to implement) * Register.ascx: Allows the error display in case of lack of power of the user at registering another user. * Estimate.aspx: use the partial view to register from the Account folder. Cleans the useless reference to ~/Theme/dark/style.css, that was for using the "tablesorter.js", no used anymore. * Web.config: Trying to have all the Index pages to work...
11 years ago
}
11 years ago
} else
YavscHelpers.Notify( ViewData, "La clé utilisée pour valider ce compte est incorrecte" );
12 years ago
return View ();
}
* AccountController.cs: Register and reset passord from Web API * GCMController.cs: initial creation, will host GCM calls and related procedures. * ResetPassword.aspx: Html view to reset the password * LocalizedText.resx: * LocalizedText.fr.resx: new String form circles * Web.config: * Web.csproj: * YavscModel.csproj: * LocalizedText.Designer.cs: * Profile.cs: * Profile.cs: * LocalizedText.fr.Designer.cs: * LoginModel.cs: * Publishing.cs: * CalendarController.cs: * LoginModel.cs: * GCMRegister.cs: * Publishing.cs: * GCMRegister.cs: * NewRoleModel.cs: * NewRoleModel.cs: * RegisterModel.cs: * NewAdminModel.cs: * RegisterModel.cs: * NewAdminModel.cs: * LostPasswordModel.cs: * RegisterViewModel.cs: * RegisterViewModel.cs: * ProviderPublicInfo.cs: * RegisterClientModel.cs: * ChangePasswordModel.cs: * ProviderPublicInfo.cs: * RegisterClientModel.cs: * ChangePasswordModel.cs: Fixes a typo (in the namespace :-/) * NpgsqlCircleProvider.cs: Fixes the Circle creation * Global.asax.cs: * AdminController.cs: * NpgsqlContentProvider.cs: code formatting * BlogsController.cs: * CircleController.cs: * WorkFlowController.cs: * PaypalApiController.cs: * FrontOfficeController.cs: refactoring * AccountController.cs: Adds the way to reset the password * FrontOfficeController.cs: xml doc * T.cs: Make this class an helper to translation * YavscHelpers.cs: Implements the e-mail sending * style.css: style uniformization * Circles.aspx: Implements the Html interface to Circle creation (modifications and deletions are still to implement) * Register.ascx: Allows the error display in case of lack of power of the user at registering another user. * Estimate.aspx: use the partial view to register from the Account folder. Cleans the useless reference to ~/Theme/dark/style.css, that was for using the "tablesorter.js", no used anymore. * Web.config: Trying to have all the Index pages to work...
11 years ago
12 years ago
}
}