public JsonResult <bool> SaveUser(CoreModels.User user)
 {
     return(API.Execute <bool>(r =>
     {
         CoreServices.Security.VerifyActivityAuthorized("Account", "Administration");
         r.Data = !string.IsNullOrEmpty(CoreServices.Account.SaveUser(user));
     }));
 }
Exemple #2
0
 public JsonResult <dynamic> CreatePortal(CoreModels.User adminUser, CoreModels.Portal portal, List <string> packages)
 {
     return(API.Execute <dynamic>(r =>
     {
         Security.VerifyActivityAuthorized("Portal", "Administration");
         var portalId = Core.Services.Update.InstallPortal(adminUser, portal);
         foreach (var package in packages)
         {
             Update.InstallPackage(package, portalId);
         }
         r.Data = new { selectedId = portalId, portals = CoreServices.Portal.GetPortals() };
     }));
 }