Beispiel #1
0
        private void CheckHidden(ContentDataMetadata metadata)
        {
            foreach (var role in Roles)
            {
                bool currentUserIsInRole = HttpContext.Current.User.IsInRole(role);

                if (currentUserIsInRole)
                {
                    metadata.ShowForEdit = false;
                }
            }

            return;
        }
Beispiel #2
0
        private void CheckReadonly(ContentDataMetadata metadata)
        {
            foreach (var role in Roles)
            {
                bool currentUserIsInRole = HttpContext.Current.User.IsInRole(role);

                if (currentUserIsInRole)
                {
                    metadata.IsReadOnly = false;
                }
            }

            return;
        }