예제 #1
0
        private void UpdateCatalog(webModel.Catalog catalog)
        {
            var moduleCatalog = catalog.ToCoreModel();

            CheckCurrentUserHasPermissionForObjects(CatalogPredefinedPermissions.Update, catalog);

            _catalogService.Update(new[] { moduleCatalog });
        }
예제 #2
0
        public IHttpActionResult Create(webModel.Catalog catalog)
        {
            var newCatalog = _catalogService.Create(catalog.ToCoreModel());
            var retVal     = newCatalog.ToWebModel();

            //Need for UI permission checks
            retVal.SecurityScopes = GetObjectPermissionScopeStrings(newCatalog);
            return(Ok(retVal));
        }