mirror of
https://github.com/bitwarden/server.git
synced 2025-04-05 21:18:13 -05:00
feat (newDeviceVerification)
Added conditional for selfhosted to manage access to feature
This commit is contained in:
parent
275f7ceb27
commit
ca21758492
@ -1,6 +1,7 @@
|
|||||||
@using Bit.Admin.Enums;
|
@using Bit.Admin.Enums;
|
||||||
@inject Bit.Admin.Services.IAccessControlService AccessControlService
|
@inject Bit.Admin.Services.IAccessControlService AccessControlService
|
||||||
@inject Bit.Core.Services.IFeatureService FeatureService
|
@inject Bit.Core.Services.IFeatureService FeatureService
|
||||||
|
@inject Bit.Core.Settings.GlobalSettings GlobalSettings
|
||||||
@inject IWebHostEnvironment HostingEnvironment
|
@inject IWebHostEnvironment HostingEnvironment
|
||||||
@model UserEditModel
|
@model UserEditModel
|
||||||
@{
|
@{
|
||||||
@ -8,6 +9,7 @@
|
|||||||
|
|
||||||
var canViewUserInformation = AccessControlService.UserHasPermission(Permission.User_UserInformation_View);
|
var canViewUserInformation = AccessControlService.UserHasPermission(Permission.User_UserInformation_View);
|
||||||
var canViewNewDeviceException = AccessControlService.UserHasPermission(Permission.User_NewDeviceException_Edit) &&
|
var canViewNewDeviceException = AccessControlService.UserHasPermission(Permission.User_NewDeviceException_Edit) &&
|
||||||
|
GlobalSettings.EnableNewDeviceVerification &&
|
||||||
FeatureService.IsEnabled(Bit.Core.FeatureFlagKeys.NewDeviceVerification);
|
FeatureService.IsEnabled(Bit.Core.FeatureFlagKeys.NewDeviceVerification);
|
||||||
var canViewBillingInformation = AccessControlService.UserHasPermission(Permission.User_BillingInformation_View);
|
var canViewBillingInformation = AccessControlService.UserHasPermission(Permission.User_BillingInformation_View);
|
||||||
var canViewGeneral = AccessControlService.UserHasPermission(Permission.User_GeneralDetails_View);
|
var canViewGeneral = AccessControlService.UserHasPermission(Permission.User_GeneralDetails_View);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user