Grundrisse Rechte
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
<Setter Property="Margin" Value="3" />
|
||||
<Setter Property="Padding" Value="3" />
|
||||
<Setter Property="VerticalAlignment" Value="Top" />
|
||||
<Setter Property="TextElement.Foreground" Value="#FF000000" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Header1" TargetType="Label">
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
SelectedIndex="0"
|
||||
ContextMenuOpening="PhotosListBox_ContextMenuOpening"
|
||||
Style="{StaticResource PhotoListBox}">
|
||||
<ListBox.ContextMenu>
|
||||
<ContextMenu>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using BeWo.Core;
|
||||
using BeWo.ViewModel;
|
||||
using BeWo.ViewModel.ListViewModel;
|
||||
using BS.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@@ -24,6 +25,8 @@ namespace BeWo.View.Detail.Wohneinheit
|
||||
/// </summary>
|
||||
public partial class WohneinheitGrundrissControl : UserControl
|
||||
{
|
||||
public bool PermissionWohneinheitGalleryManage { get; } = BeWoApp.HasLoggedOnUserRight(UserRightType.WohnheimView_Wohneinheit_Gallery_Manage);
|
||||
|
||||
public ImageListVM ViewModel => DataContext as ImageListVM;
|
||||
|
||||
public WohneinheitGrundrissControl()
|
||||
@@ -83,5 +86,11 @@ namespace BeWo.View.Detail.Wohneinheit
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void PhotosListBox_ContextMenuOpening(object sender, ContextMenuEventArgs e)
|
||||
{
|
||||
if (!PermissionWohneinheitGalleryManage)
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
Text="{Binding Path=Zusatznotiz, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
<local:WohneinheitGrundrissControl DataContext="{Binding ImageListVM}" />
|
||||
<local:WohneinheitGrundrissControl Visibility="{Binding Path=DataContext.PermissionWohneinheitGalleryView, ElementName=root_grid,Converter={StaticResource BoolVisibilityConverter}}" DataContext="{Binding ImageListVM}" />
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
@@ -20,7 +20,6 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
public bool PermissionWohneinheitManage { get; } = BeWoApp.HasLoggedOnUserRight(UserRightType.WohnheimView_Wohneinheit_Manage);
|
||||
|
||||
public bool PermissionWohneinheitGalleryView { get; } = BeWoApp.HasLoggedOnUserRight(UserRightType.WohnheimView_Wohneinheit_Gallery_View);
|
||||
public bool PermissionWohneinheitGalleryManage { get; } = BeWoApp.HasLoggedOnUserRight(UserRightType.WohnheimView_Wohneinheit_Gallery_Manage);
|
||||
|
||||
/// <summary>
|
||||
/// Designer
|
||||
|
||||
Reference in New Issue
Block a user