Esempio n. 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;
        }
Esempio n. 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;
        }