mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 16:12:49 -05:00
limit edit functions to cloud hosted
This commit is contained in:
@ -7,6 +7,7 @@ using Bit.Admin.Models;
|
||||
using System.Collections.Generic;
|
||||
using Bit.Core.Models.Table;
|
||||
using Bit.Core;
|
||||
using Bit.Core.Utilities;
|
||||
|
||||
namespace Bit.Admin.Controllers
|
||||
{
|
||||
@ -65,6 +66,7 @@ namespace Bit.Admin.Controllers
|
||||
return View(new OrganizationViewModel(organization, users));
|
||||
}
|
||||
|
||||
[SelfHosted(NotSelfHostedOnly = true)]
|
||||
public async Task<IActionResult> Edit(Guid id)
|
||||
{
|
||||
var organization = await _organizationRepository.GetByIdAsync(id);
|
||||
@ -79,6 +81,7 @@ namespace Bit.Admin.Controllers
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
[SelfHosted(NotSelfHostedOnly = true)]
|
||||
public async Task<IActionResult> Edit(Guid id, OrganizationEditModel model)
|
||||
{
|
||||
var organization = await _organizationRepository.GetByIdAsync(id);
|
||||
|
@ -7,6 +7,7 @@ using Bit.Admin.Models;
|
||||
using System.Collections.Generic;
|
||||
using Bit.Core.Models.Table;
|
||||
using Bit.Core;
|
||||
using Bit.Core.Utilities;
|
||||
|
||||
namespace Bit.Admin.Controllers
|
||||
{
|
||||
@ -62,6 +63,7 @@ namespace Bit.Admin.Controllers
|
||||
return View(new UserViewModel(user, ciphers));
|
||||
}
|
||||
|
||||
[SelfHosted(NotSelfHostedOnly = true)]
|
||||
public async Task<IActionResult> Edit(Guid id)
|
||||
{
|
||||
var user = await _userRepository.GetByIdAsync(id);
|
||||
@ -76,6 +78,7 @@ namespace Bit.Admin.Controllers
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
[SelfHosted(NotSelfHostedOnly = true)]
|
||||
public async Task<IActionResult> Edit(Guid id, UserEditModel model)
|
||||
{
|
||||
var user = await _userRepository.GetByIdAsync(id);
|
||||
|
Reference in New Issue
Block a user