Umbraco - members creating back-end content

坚强是说给别人听的谎言 提交于 2019-12-24 09:16:25

问题


I am trying to build an intranet where thousands of employees could create,edit and publish documents to the site.

These documents will be fairly simple (possibly one rich text field and a few other simpler fields).

I want to treat them as Umbraco back-end documents (rather than say data in separate SQL tables) so they can be included in partial views.

There will be other, more complex documents but these will be managed by a smaller number of back-end users, so that is fine.

I don't believe it is correct to treat the thousands of employees as users as I have read this will cause performance issues.

Therefore, before giving up, my last thought - suggested by others - is to create them as members, create a few front end pages that include forms, and they then submit these forms to a new controller that can check their membership and use the API to create, edit and/or publish the document submitted,

They should only be able to edit documents created by themselves, so the controller would need to know who the logged in member is (and compare that to the membership id I would store on all documents as creator).

  1. Is this possible? Is it ok, or would it affect performance/security?
  2. If it is possible, can I just upload controllers and views to the App_Code folder without compiling and uploading dlls etc?
  3. Finally, I believe it is possible to authenticate members based on their Windows (Active Directory) log in?

Sorry for asking so many questions and many thanks to anyone who can help.


回答1:


sure it's all possible!

Ad.1. Check the ContentService documentation (https://our.umbraco.org/documentation/reference/management/services/contentservice) and just use it to create new content nodes from frontend into Umbraco documents. You can also check Umbraco Rest API (https://our.umbraco.org/documentation/implementation/Rest-Api/), but it's still before v1.0.0, so may be causing some problems (especially with security). I wrote an article about using API here: http://24days.in/umbraco/2015/umbraco-rest-api/.

Ad.2. You can do it, but it's not a recommended solution. MVC applications are by default created as WAP (Web Application Projects) and all *.cs files gets compiled not only those from App_Code directory. If you have a typical WebSite project it's even better from architecture perspective to separate business logic from website / Umbraco instance and have it in separated DLL. Btw. why you're affraid of deploys? :)

Ad.3. Sure! Umbraco use ASP.NET Identity so it can be extended to use any custom OAuth providers. There are even couple of them already created for us. Check: https://our.umbraco.org/Documentation/Reference/Security/ and https://github.com/umbraco/UmbracoIdentityExtensions. This is described for accessing Umbraco Backoffice, but there are also packages allowing to use Active Directory logins for members (e.g. https://our.umbraco.org/projects/developer-tools/active-directory-providers/).

Happy coding and I hope that I helped!



来源:https://stackoverflow.com/questions/39448339/umbraco-members-creating-back-end-content

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!