使用net-ldap登录Active Directory“无环境”(Active Directory “contextless” login with net-ldap)
我正在写一个Rails 3.2应用程序,作为身份验证,我想使用Net :: LDAP连接到公司MS ADDS。 我可以使用Net :: LDAP对用户进行身份验证。 问题是我的用户存在于不同的OU中,因此我想进行“无环境”登录。 不确定它是否在Microsoft世界中被称为无环境。 我来自Novell的背景。
我所知道的是不必提供FQDN,只需提供sAMAccountName和密码。 :基本选项似乎锁定了我在该上下文中并期望用户仅存在于该OU中。
我是否必须先与用户绑定(FQDN),然后进行过滤搜索或什么? 任何建议都是受欢迎的。
I'm writting a Rails 3.2 application and as authentication I want to use Net::LDAP to connect to the company MS ADDS. I can authenticate a user with Net::LDAP. The problem is that my users exists in different OU's so I would like to do a "contextless" login. Not sure if it is called contextless in the Microsoft world. I come from a Novell background.
What I meen is to not have to give the FQDN, just the sAMAccountName and password. The :base options seems to lock me in that context and expects the users to exist in that OU alone.
Do I have to bind with a user first(FQDN) then do a filter search or what? Any suggesions are welcome.
原文:https://stackoverflow.com/questions/15094354
最满意答案
你无法修复1 。
造成差异的原因是Firefox使用“DirectWrite” - 一种与Chrome相比渲染文本的技术。
在这里阅读更多内容: http : //www.basschouten.com/blog1.php/font-rendering-gdi-versus-directwrite
阅读本文,特别是“提示和间距差异”部分: http : //blog.mozilla.com/nattokirai/2011/08/11/directwrite-text-rendering-in-firefox-6/
要修复2 ,请尝试在
px
设置line-height
(20px
看起来不错)。 要修复水平对齐,请删除text-indent
并稍微调整width
(28px
看起来不错)。您还应该在文本周围添加更多的间距。 我认为这个快速模型看起来更好:
You can't fix 1.
The reason for the differences is that Firefox uses "DirectWrite" - a different technique to render text than Chrome does.
Read more here: http://www.basschouten.com/blog1.php/font-rendering-gdi-versus-directwrite
And read this, particularly the "Hinting and spacing differences" section: http://blog.mozilla.com/nattokirai/2011/08/11/directwrite-text-rendering-in-firefox-6/
To fix 2, try setting a
line-height
inpx
(20px
looks good). To fix the horizontal alignment, remove thetext-indent
and adjust thewidth
slightly (28px
looks good).You should also add a bit more spacing around the text. I think this quick mockup looks better:
相关问答
更多-
正如@Pedro_Costa所述,.ol-touch风格仅在某些浏览器中触发,这会使字体变得更大,如下面的CSS规则所示: ol-touch .ol-control button{font-size:1.5em} 所以,问题在于Open Layers仅在某些浏览器和操作系统中检测触摸功能。 检查我看到的OpenLayers代码: ol.has.TOUCH = ol.ASSUME_TOUCH || 'ontouchstart' in window; 这看起来没问题。 所以,显然这是Linux中的Chrom ...
-
修复了Firefox中的字体大小?(Fixed font size in firefox?)[2022-07-10]
你有三个选择: 修复您的菜单布局,使其更容忍不同的字体大小(建议:大量用户不同意您选择的字体大小 - 不仅限于视障用户)。 用图像替换文本(使用适当的替代文字!); FF(和IE)仍然会在“缩放”模式下缩放它们,但不会破坏页面的布局。 没做什么。 将破碎的布局作为一个大的“FU”留给那些否则会阅读固定大小的文本的用户。 You have three choices: Fix your menu layout such that it is more tolerant of different font si ... -
用这个 : span { font-family: Verdana; font-size: 16px; font-weight: bold; line-height: 1.15; display: inline-block; } 区别在于浏览器中字体的呈现方式不同。 Use this : span { font-family: Verdana; font-size: 16px; font-weight: bold; line-height: 1.15; displa ...
-
缩放使字体更大。 您的媒体查询使字体变小。 这两个人互相争斗。 发生这种情况是因为当缩放使像素变大时,窗口中的像素更少,这使得较小窗口的媒体查询匹配。 此行为特定于桌面浏览器。 移动浏览器不使用窗口大小进行媒体查询,而是使用屏幕大小( 粗略地 )。 在其他字体大小很奇怪的情况下,可能是因为text-size-adjust 。 Zoom makes the font bigger. Your media query makes the font smaller. These two fight each ot ...
-
IE中的字体与Firefox和Chrome中的字体不同......为什么?(Font looks different in IE than it does in Firefox and Chrome…why?)[2023-07-22]
定义字体大小样式: 您可以尝试以像素为单位定义以获得更多一致性: 代码将放在你的html 中 Define a font size style: ... -
我建议使用Firefox支持的字体格式,或者使用font-size-adjust在不同字体系列中获得统一尺寸。 您可以通过添加以下CSS来使用font-size-adjust : font-size-adjust:0.5; 这会将所有字体设置为具有大致相同高度的小写字符(通常,在应用不同字体时查看看起来更接近相同大小的文本)。 I suggest either using a font format that Firefox supports, or using font-size-adjust to g ...
-
Chrome目前不在Windows上使用DirectWrite进行字体渲染。 文本没有消除锯齿,因此字体大小被舍入(到最接近的整数?)。 他们正在研究它。 查看相关错误票证的评论 ,特别是附件: 如果您使用正确的标志启用DirectWrite,它应该平滑地动画。 Chrome currently doesn't use DirectWrite for font rendering on Windows. Text isn't anti-aliased and as such font-sizes are r ...
-
用于字体大小的execCommand在Google Chrome中导致问题(execCommand for font-size causes problem in Google Chrome)[2022-06-03]
请参阅http://quirksmode.org 上execCommand的兼容性图表 。 Internet Explorer根本不支持字体大小的改变 ,Opera和Firefox包装字体标签,Safari / Chrome按照您的建议行事。 你不能改变这个功能,你将不得不建立一个与当前选择范围一起工作的替代方案来实现一种与X浏览器兼容的方法。 See the compatibility charts for execCommand at http://quirksmode.org. Internet Ex ... -
更新:这是因为每个浏览器都有自己的字体渲染引擎 。 我使用您当前的sans-serif字体复制了您的结果。 当我将字体更改为monospace字体时也会发生这种情况。 我相信你最好使用非系统字体。 例如,我想看看Open Sans等典型Google字体会发生什么,我发现使用它时问题不存在。 顺便说一句,在该网站上做得很好。 看起来很好。 TSM! TSM! TSM! Update: This is because each browser has its own font rendering engine. ...
-
你无法修复1 。 造成差异的原因是Firefox使用“DirectWrite” - 一种与Chrome相比渲染文本的技术。 在这里阅读更多内容: http : //www.basschouten.com/blog1.php/font-rendering-gdi-versus-directwrite 阅读本文,特别是“提示和间距差异”部分: http : //blog.mozilla.com/nattokirai/2011/08/11/directwrite-text-rendering-in-firefox ...