简体   繁体   English

在将用户管理委派给Dynamics CRM 2011后端的前端外壳应用程序中处理用户特权

[英]Handling user privileges in a frontend shell application that delegates user management to a dynamics CRM 2011 backend

I currently have an ongoing project that's basically a frontend for Microsoft Dynamics CRM 2011. I authenticate the user using their username and password for our own CRM installation and access all data using their privileges. 我目前有一个正在进行的项目,该项目基本上是Microsoft Dynamics CRM 2011的前端。我使用用户名和密码对用户进行身份验证以进行我们自己的CRM安装,并使用其权限访问所有数据。 All privilege management, including access control, is done by CRM. 所有特权管理(包括访问控制)均由CRM进行。 There is no user or privilege management done by the frontend itself. 前端本身无法完成用户或特权管理。 There are basically 3 pages: a login page, a main page where everything is loaded dynamically using user controls, and an error page. 基本上有3个页面:一个登录页面,一个使用用户控件动态加载所有内容的主页和一个错误页面。

I'm currently thinking about throwing an elmah log manager in there so I can check errors more easily without compromising the safety. 我目前正在考虑将elmah日志管理器放在那里,这样我可以更轻松地检查错误,而不会影响安全性。 Naturally, this means placing this behind an administrator wall so it's inaccessible from outside. 自然地,这意味着将其放置在管理员的墙后,以便从外部无法访问它。 However, the frontend does not have a separate privilege management system, so I cannot just say "allow adminstrator role, deny*" in my web.config, because there's no administrator role. 但是,前端没有单独的特权管理系统,因此我不能在我的web.config中仅说“ allow adminstrator role,deny *”,因为没有管理员角色。

I'm currently trying to figure out what the best way to handle this is. 我目前正在尝试找出解决此问题的最佳方法。 I doubt the proper way to handle this is to add a completely separate user management system just for the elmah logs. 我怀疑处理此问题的正确方法是为elmah日志添加完全独立的用户管理系统。

I would add code in your PageLoad to check to see if the current logged in user has a CRM SystemUser account, and if it does, check to see if it has an Administrator Role. 我将在您的PageLoad中添加代码,以检查当前登录的用户是否具有CRM SystemUser帐户,如果存在,请检查其是否具有管理员角色。 If it doesn't just redirect to another page or display an error. 如果不只是重定向到另一个页面或显示错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM