コード例 #1
0
        public ActionResult Update(int id)
        {
            EPermission permissions = sectionRpstry.GetPermissions(sectionName, loggedUser.UserId);

            if (permissions.CanUpdate)
            {
                ViewBag.Permissions     = permissions;
                ViewBag.Roles           = roleRpstry.GetAll();
                ViewBag.PermissionTypes = permissionTypeRpstry.GetAll();
                var entry = rpstry.GetBiId(id);
                return(View(entry));
            }
            else
            {
                return(View("Error", "You do not have permissions to access this section."));
            }
        }