//[Route("navnerom/{parentRegister}/{registerowner}/{registername}/ny")] //[Route("navnerom/{registername}/ny")] public ActionResult Create(string systemId) { NameSpace nameSpace = new NameSpace(); nameSpace.AddMissingTranslations(); Models.Register register = GetRegister(systemId); nameSpace.register = register; if (register.parentRegisterId != null) { nameSpace.register.parentRegister = register.parentRegister; } if (UserHasAccess(nameSpace, "Create")) { return(View(nameSpace)); } return(HttpNotFound("Ingen tilgang")); }
//[Route("navnerom/{parentRegister}/{registerowner}/{registername}/ny")] //[Route("navnerom/{registername}/ny")] public ActionResult Create(string registername, string parentRegister) { NameSpace nameSpace = new NameSpace(); nameSpace.AddMissingTranslations(); Models.Register register = GetRegister(registername, parentRegister); nameSpace.register = register; if (register.parentRegisterId != null) { nameSpace.register.parentRegister = register.parentRegister; } string role = GetSecurityClaim("role"); string user = GetSecurityClaim("organization"); if (UserHasAccess(role, user, nameSpace, "Create")) { return(View(nameSpace)); } return(HttpNotFound("Ingen tilgang")); }