- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
问题
我已经编写了自定义成员/角色/配置文件提供程序来针对 Active Directory 域对用户进行身份验证。我正在尝试使用角色中的角色为 ADDOMAIN 中的用户提供站点核心权限,方法是将他们的 AD 组添加为适当的站点核心角色的成员。如果我以 AD 用户身份登录,我似乎没有 sitecore 角色的权限,但是,如果我以同一 sitecore 角色的 sitecore 用户身份登录,我确实获得了权限。我需要在成员(member)/角色提供者中包含哪些东西才能使这项工作发挥作用,或者这里还有其他东西在起作用吗?
我们使用的是 Sitecore 6.4 版,如果这有什么不同的话。
解决方案 :@Yan 的回答完全解决了这个问题。问题是语言权限仅明确授予 sitecore 域用户(通过 sitecore\Everyone)。创建 AD 用户时,他们位于不同的域中并且不继承这些语言权限。解决方法是专门向 AD 域授予读/写权限,或者像我所做的那样,创建另一个站点核心角色并将必要的权限分配给该角色,然后将我的 AD 角色分配给该角色。
您需要在/System/Languages/[LANGUAGE: en in my case] 项的 master 数据库中设置 lang:read 和 lang:write 权限。如果您在安全编辑器中看不到这些权限,请单击列按钮并选择这些列。
更多细节
对于详细程度,我提前道歉。
我已经编写了自定义成员/角色/配置文件提供程序来针对 Active Directory 域对用户进行身份验证。我们没有使用 sitecore 提供的 AD 模块,因为我们只希望我们的用户看到特定的组和用户,而不是 AD 中的每个用户/组。我也只是尝试提供身份验证和角色成员资格服务,因为我不希望站点核心管理员能够修改 AD 用户或角色。
我正在测试的角色称为 sitecore\Content Author,因为它具有我希望我的 AD 用户拥有的权限。 AD 用户是 AD 和 sitecore 内的 ADDOMAIN\Web-Authors-Group 组的一部分,我已将此组设置为属于 sitecore\Content Author。用户 ADDOMAIN\sitecoreauthor1 是 AD 中 ADDOMAIN\Web-Authors-Group 的成员,我还有一个 sitecore 用户 sitecore\bcauthor 用户,他是 sitecore\Content Author 角色的成员。我还设置了一个单独的站点核心角色,称为 sitecore\SecondAuthorRole 和该角色中的用户 sitecore\secondAuthor 以测试角色中的角色功能是否正常工作。
万一这令人困惑,这是一个视觉表示:
Sitecore Roles sitecore\Content Author - sitecore\bcauthor - ADDOMAIN\Web-Authors-Group - sitecore\SecondAuthorRole sitecore\SecondAuthorRole - sitecore\secondAuthorActiveDirectory Groups ADDOMAIN\Web-Authors-Group - ADDOMAIN\sitecoreauthor1
If I log in as sitecore\bcauthor, I can do everything that the sitecore\Content Author role can do. If I log in as sitecore\secondAuthor, I can also do everything that the sitecore\Content Author role can do. However, if I log in as the ADDOMAIN\sitecoreauthor1 user, I don't seem to have any of the permissions of the sitecore\Content Author role.
The permissions for the home item (which is the item I'm testing against) are:
ar|sitecore\Content Author|pe|+item:rename|+item:write|+item:delete|+item:create|pd|+item:rename|+item:write|+item:delete|+item:create
public class DirectoryMembershipProvider : System.Web.Security.MembershipProvider
{
public override string ApplicationName { get; set; }
public override bool EnablePasswordReset { get { return false; } }
public override bool EnablePasswordRetrieval { get { return false; } }
public override int MaxInvalidPasswordAttempts { get { return 100; } }
public override int MinRequiredNonAlphanumericCharacters { get { return 0; } }
public override int MinRequiredPasswordLength { get { return 1; } }
public override MembershipPasswordFormat PasswordFormat { get { return MembershipPasswordFormat.Clear; } }
public override string PasswordStrengthRegularExpression { get { return ""; } }
public override bool RequiresQuestionAndAnswer { get { return false; } }
public override bool RequiresUniqueEmail { get { return false; } }
// Not implemented
public override bool ChangePassword(string username, string oldPassword, string newPassword)
public override bool ChangePasswordQuestionAndAnswer(string username, string password, string newPasswordQuestion, string newPasswordAnswer)
public override MembershipUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)
protected override byte[] DecryptPassword(byte[] encodedPassword)
public override bool DeleteUser(string username, bool deleteAllRelatedData)
protected override byte[] EncryptPassword(byte[] password)
protected override byte[] EncryptPassword(byte[] password, MembershipPasswordCompatibilityMode legacyPasswordCompatibilityMode)
protected override void OnValidatingPassword(ValidatePasswordEventArgs e)
public override string ResetPassword(string username, string answer)
public override bool UnlockUser(string userName)
public override void UpdateUser(MembershipUser user)
// Implemented functions
public override MembershipUserCollection FindUsersByEmail(string emailToMatch, int pageIndex, int pageSize, out int totalRecords)
public override MembershipUserCollection FindUsersByName(string usernameToMatch, int pageIndex, int pageSize, out int totalRecords)
public override MembershipUserCollection GetAllUsers(int pageIndex, int pageSize, out int totalRecords)
public override string GetPassword(string username, string answer)
public override MembershipUser GetUser(object providerUserKey, bool userIsOnline)
public override MembershipUser GetUser(string username, bool userIsOnline)
public override string GetUserNameByEmail(string email)
public override bool ValidateUser(string username, string password)
}
public class DirectoryRoleProvider : System.Web.Security.RoleProvider
{
public override string ApplicationName { get; set; }
// not implemented
public override void AddUsersToRoles(string[] usernames, string[] roleNames)
public override void CreateRole(string roleName)
public override bool DeleteRole(string roleName, bool throwOnPopulatedRole)
public override void RemoveUsersFromRoles(string[] usernames, string[] roleNames)
// implemented functions
public override string[] FindUsersInRole(string roleName, string usernameToMatch)
public override string[] GetAllRoles()
public override string[] GetRolesForUser(string username)
public override string[] GetUsersInRole(string roleName)
public override bool IsUserInRole(string username, string roleName)
public override bool RoleExists(string roleName)
}
public class DirectoryProfileProvider : System.Web.Profile.ProfileProvider
{
public override string ApplicationName { get; set; }
public override int DeleteInactiveProfiles(ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate) { return 0; }
public override int DeleteProfiles(ProfileInfoCollection profiles) { return 0; }
public override int DeleteProfiles(string[] usernames) { return 0; }
// not implemented
public override ProfileInfoCollection FindInactiveProfilesByUserName(ProfileAuthenticationOption authenticationOption, string usernameToMatch, DateTime userInactiveSinceDate, int pageIndex, int pageSize, out int totalRecords)
public override ProfileInfoCollection GetAllInactiveProfiles(ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate, int pageIndex, int pageSize, out int totalRecords)
// implemented functions
public override ProfileInfoCollection FindProfilesByUserName(ProfileAuthenticationOption authenticationOption, string usernameToMatch, int pageIndex, int pageSize, out int totalRecords)
public override ProfileInfoCollection GetAllProfiles(ProfileAuthenticationOption authenticationOption, int pageIndex, int pageSize, out int totalRecords)
public override int GetNumberOfInactiveProfiles(ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate)
public override SettingsPropertyValueCollection GetPropertyValues(SettingsContext context, SettingsPropertyCollection collection)
public override void SetPropertyValues(SettingsContext context, SettingsPropertyValueCollection collection)
}
最佳答案
老实说,我没有阅读整个文本,只是其中的“问题”部分。我怀疑我知道问题出在哪里。它与 Language:Read 和 Language:Write 权限有关。
看看我上一篇发给 this SDN forum thread 的帖子.请务必检查随附的带有图像的存档,以便更好地理解。
关于permissions - Sitecore Active Directory 权限和角色中的角色问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5495356/
我已将 Active Directory 模块与 sitecore 集成,我可以在 sitecore 用户管理器中看到广告中的用户。现在我想验证广告用户是否可以登录 sitecore。我为用户分配了
有没有办法通过代码访问Sitecore设置。 我感兴趣的具体设置是数据文件夹路径。 最佳答案 如果您想获得其他设置,您可能需要尝试:- Sitecore.Configuration.Settings.
根据 Sitecore 数据定义引用,版本 6.4,第 4.3.1 节: Sitecore processes queries using the fasted technology possible
Sitecore 6.6(更新4)。 MaxMind具有与DMS集成的Sitecore-specific lookup service选项。 MaxMind还具有一些更通用的Web服务。 可以将“通用
当我在 Sitecore 单行字段文本框中按 ENTER 时,它会呈现两个换行符 此问题仅出现在 Chrome/Firefox 中。在 IE ENTER 中只导致一个 我可以在这些浏览器中以某种方式
好奇为什么我无法从那里取回任何物品 HistoryManager.GetHistory(database, fromThisDate, toThisDate) ,我查看了 Sitecore 数据库,发
我们正在使用Sitecore 6.2,并且要求在Sitecore管理网站上使用SSL。 除了将内容保存在Rich Text编辑器中(单击“接受”按钮)时,所有指向媒体库项目的URL都将添加“ http
如何以编程方式登录 Sitecore? 例如,如果您想将 Sitecore API 的一小部分连接到桌面应用程序,则需要先登录到 sitecore 才能访问数据库等。 这可以做到吗? 最佳答案 正如
我已将 Sitecore 安装设置到两个不同的 IIS 站点。一个包含所有 Sitecore 管理文件,另一个包含共享相同 Web.config 的干净 Web 文件,而我的 Data 文件夹位于这两
我在一台开发服务器上安装了 sitecore,并将站点根文件夹复制到一堆开发机器上。此过程在 7 台计算机中的 6 台上运行良好,我们可以正常看到 sitecore 登录和内容编辑器页面,并通过 II
我已经设置了一个本地 Sitecore 环境,所有 sql 和 mongodb 数据库都可以正常工作。 除了我在体验文件(联系人)中没有获得任何数据 我看到 mongo 中的tracking_cont
我的 Sitecore 网站要求用户名是电子邮件地址。 我可以在代码中成功创建用户,但每当我尝试在用户管理器上的 Sitecore CMS 中手动创建 Extranet 用户时,都会引发电子邮件用户名
客户询问 Sitecore 中是否有任何地方内容作者可以为内容项的单个版本添加内部注释。该注释可能会说“我更改了内容字段以包含更新的描述”之类的内容。这与您在工作流程中提交项目时简单地添加评论不同。他
现在我的 sitecore 工作流程遇到问题。问题如下: 我的模板标准值已设置工作流程和默认工作流程字段集。工作流程状态设置为草稿。但是,每次我从此模板创建项目时,它都不会继承工作流程部分字段,所有字
我在 sitecore 用户管理器中遇到了这个奇怪的错误。我一打开用户管理器就收到此错误我无法将用户分配给角色。 有人可以帮忙吗? 提前致谢。 P.S > 以防万一它无法正确显示:http://www
我知道有一个 SortOrder 字段。然而,在我看来,该字段很多次都是空的,直到您真正开始在列表中四处移动内容项。然后,如果您有一个项目列表并四处移动其中一些项目,将为它们分配一个 SortOrde
我知道这听起来像是一个愚蠢的问题,但无数的谷歌搜索都没有给我想要的答案。我看到很多关于如何基于 Sitecore 模板等格式化电子邮件的数据,但没有关于实际发送邮件的信息。我是否需要通过 .net 代
我想 Hook item:renamed 事件来做一些处理。不过可能需要几分钟。事件处理程序是与正常管道执行异步执行还是同步执行?如果我需要自己执行此操作,是否有标准的 Sitecore 方法可以异步
我一直在浏览 Sitecore.Kernel,但似乎找不到 Sitecore 运行 Initialize 管道的位置。它是在每个页面请求上运行还是在应用程序启动时只运行一次?您能指出为此管道调用 Ru
我已经在 sitecore 中安装了重定向模块。在模块内部,我创建了“重定向网址”。在重定向网址中,我写了请求的网址“http://domainname/pagename”并从内容中选择了重定向到。但
我是一名优秀的程序员,十分优秀!