private void CheckHidden(ContentDataMetadata metadata) { foreach (var role in Roles) { bool currentUserIsInRole = HttpContext.Current.User.IsInRole(role); if (currentUserIsInRole) { metadata.ShowForEdit = false; } } return; }
private void CheckReadonly(ContentDataMetadata metadata) { foreach (var role in Roles) { bool currentUserIsInRole = HttpContext.Current.User.IsInRole(role); if (currentUserIsInRole) { metadata.IsReadOnly = false; } } return; }