【问题标题】:WindowsPrincipal.IsInRole takes into account groups inside groups?WindowsPrincipal.IsInRole 考虑组内的组?
【发布时间】:2012-12-07 10:25:03
【问题描述】:

如果我有一个属于某个组的主体,该组属于某个组,该组属于添加到构建的角色“管理员”的组,那么调用 principal.IsInRole(WindowsBuiltInRole.Administrator) 是否会返回 true?

【问题讨论】:

  • 你考虑过测试一下吗?
  • 它做什么和应该做什么是不同的事情。我想避免在每个平台上测试该方法来发现它的行为。

标签: c# .net windows iprincipal


【解决方案1】:

根据提供的信息,它将返回 true yes。然而,正如 Blam 所说,只需一项测试就足以确定行为是什么

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-12-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-01-03
    • 2022-01-16
    相关资源
    最近更新 更多