Exemplo n.º 1
0
        private void InferRoleSelection()
        {
            Role CMSRole = LookupBLL.GetRole(Scope.CMS, true);

            if (Int16.Parse(ddlRoles.SelectedValue) == CMSRole.Id)
            {
                _selectedRole = CMSRole;
            }
            else
            {
                _selectedRole = LookupBLL.Roles.Find(p => p.Id == Int16.Parse(ddlRoles.SelectedValue));
            }

            if (_selectedRole == null)
            {
                ShiptalkException.ThrowSecurityException("Possible role list manipulation. The selected role was not found.", "Sorry. We're unable to serve your request. Please contact support for assistance");
            }
        }