使用从外部数据库获取的用户和组构建下载区域

发布于 2024-10-16 08:05:03 字数 1539 浏览 10 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

紫竹語嫣☆ 2024-10-23 08:05:03

所以...为了使想法清晰,您需要:

  1. 免费开源系统
  2. 下载区域(上传和下载)
  3. 用户角色
  4. 利用外部数据库
  5. 进行某种自动化过程来使用外部数据库中的用户数据

我会是要点(如果我错过了任何要点,请添加它们作为评论以更新此答案)

  1. 我会使用 Drupal http://drupal。 org
  2. 在 drupal 中,您可以创建自定义内容类型并将系统设置为几乎任何您想要的内容。在这种情况下,我建议您使用以下模块:

  3. 用户角色可以使用内置选项以及每个字段权限进行管理(可通过内容模块)。您可以根据需要向用户分配任意数量的角色

  4. 使用用户导入模块,您可以通过多种方式导入用户,但它不是那么自动化。您必须将用户数据库导出为 CSV,然后将其导入到 drupal 中。然后,这些模块允许您映射字段。

  5. 您可以使用 cron 或使用 http://island.byu.edu/drupal/content/drupal-6-external-database-authentication-roles

步骤应该是:

  1. 安装drupal 6 (mysql+php) < em>[你也可以使用 drupal 7,但现在有更多针对 drupal 6 的教程和模块,因为 d7 刚刚推出,用户导入模块仍然无法用于 d7]
  2. 启用我推荐的模块
  3. 创建新的内容类型(例如文件)并添加文件类型字段
  4. 创建分类词汇表为文件创建“类别”并将其分配给“文件”内容类型
  5. 创建一些角色(例如编辑者、所有者、只读)等等)并根据您希望每个角色执行的操作分配不同的权限
  6. 转到用户导入模块并导入您的用户数据库(您也可以更新现有用户)并映射字段(重要的是用户名,密码,角色)到 csv 文件中的字段
  7. 创建一些视图来显示您想要的内容(文件)(例如,按类别)、按角色等...

我认为这些是拥有工作下载区域的基本步骤就像你想要的那样。当然,您可以通过添加更多模块( http://drupalmodules.com / 是一个非常好的起点)

一旦您掌握了基础知识,您就可以开始使用面板 http:// /drupal.org/project/ 自定义整个站点的布局并检查 http 中的一些主题://drupal.org/project/Themes 来改变你网站的外观和感觉(你也可以使用纯CSS)

我希望它有帮助。如果您想为此解决方案添加其他功能或有些内容不够清晰,请告诉我。

干杯!

so... to make thinks clear, you need:

  1. Free and Open Source System
  2. Download Area (upload and download)
  3. User Roles
  4. Make use of external DB
  5. to have some sort of automated process to use the user data in the external DB

I those would be the main points (If I missed any, please add them as comments to update this answer)

  1. I would go with Drupal http://drupal.org
  2. In drupal you can create custom content types and set the system up to almost whatever you want. In this case I would recommend you to use the following modules:

  3. User Roles can be managed with the built-in options plus per field permissions (available with the content module). You can assign as many roles to an user as you want

  4. Using the User Import module you can import users in many ways, but it isn't that automated. You will have to export your user db as CSV and then import it into drupal. The modules then allows you to map the fields.

  5. You may automate the complete process by using cron or replacing the User import module with the instructions found in http://island.byu.edu/drupal/content/drupal-6-external-database-authentication-roles

The steps should be:

  1. Install drupal 6 (mysql+php) [you may also go with drupal 7 but right now there are more tutorials and module sfor drupal 6, as d7 just went out, and the user import module is still not available for d7]
  2. Enable the modules I recommended
  3. Create a new content type (ex. File) and add a filetype field
  4. Create a taxonomy vocabulary to create "categories" for the files and assign it to the "Files" content type
  5. Create some roles (ex. editor, owner, read-only and so on) and assign different permissions depending of what you want each role to do
  6. go to the User import module and import your user db (you can also update the existing users) and map the fields (the important ones are username, password, roles) to the fields in your csv file
  7. create some views to show the content (files) like you want (for example, by category), by role, etc...

I think those are the basic steps to have a working download area like the one you want. Of course you may customize it as much as you like (that's the power of drupal) by adding more modules ( http://drupalmodules.com/ is a really good place to start )

Once you have the basics working you can start playing with panels http://drupal.org/project/ to customize the layout of the entire site and check some of the themes in http://drupal.org/project/Themes to change the look&feel of your site (you can also go with pure css)

I hope it helps. If you want to add another feature to this solution or something isn't clear enough please let me know.

Cheers!

以可爱出名 2024-10-23 08:05:03

Apache Lenya 可以工作。您必须编写自己的身份验证机制和组管理代码来同步数据库中的用户。任何产品都会给您带来对抗专有数据库的困难。如果您能够将用户和组数据放入目录(例如 LDAP)中,您的问题就会变得容易得多。

Apache Lenya could work. You'd have to write your own authentication mechanism and group management code to sync over the users from the DB. Any product is going to give you difficulty going against a proprietary DB. If you were able to put the user and group data into a directory, say LDAP, your problem becomes a lot easier.

享受孤独 2024-10-23 08:05:03

Joomla!使用 DOCman 组件:只能将权限授予 1 个用户或 1 个组

这实际上应该适合您。您可以为要管理的文件创建一个组,并在人员获得/失去对文件的访问权限时向该组添加/删除人员。

Joomla! with DOCman component: permissions can be granted only to 1 user or 1 group

This should actually work for you. You can create a single group for the file you want to manage and add/remove people to that group as they gain/lose access to the file.

内心激荡 2024-10-23 08:05:03

我不确定这是否能 100% 回答您的问题,但是我使用过 Daisy-cms作为一个文档管理系统。

使用 Daisy,您可以设置附件文档或您自己的文档类型。您无法创建文件夹,但您可以根据字段中的值进行访问(这是棘手的部分)。

它是开源的,易于安装到 MySQL,只需点击即可完成您想要执行的大部分操作。

希望这有帮助。

I am not sure if this answers 100% of your issues however I have used Daisy-cms as a document management system.

With Daisy you can setup Attachment documents or your own document types. You cannot create folders however you can have access (this is the tricky part) based on Values in the fields.

It's open source, simple to install against MySQL and point and click for most of what you want to do.

Hope this helps.

才能让你更想念 2024-10-23 08:05:03

我找到了这些可能的解决方案

即使它有一些错误,我选择了 Quotero,由于上述原因。它的可扩展性(相对于我需要的)让我感到惊讶。

我如何安装(在 Ubuntu Server 10 上的 Tomcat 6 和 Windows 7 上的 Tomcat 7 中)并将其与我的主 Web 应用程序集成

  • 安装 MySQL、PostgreSQL、Oracle DB、SQL Server或另一个 DBMS(最后一个需要定制)
  • 下载 quotero -deployer-2.0.war
  • 将 quotero-deployer-2.0.war 放置在 Tomcat Web 应用程序中,
  • 浏览到 http: //localhost:8080/quotero-deployer-2.0 并使用向导配置安装(请参阅快速安装教程)
  • 向导会在webapps文件夹中创建DB和2个.war:QuoteroServer和QuoteroClient;用户将使用后者
    • 在 Linux 系统中,它可能会将这些 webapp 放在 /usr/share/tomcatx/webapps 文件夹中;如果你需要它们在 /var/lib/tomcatx/webapps 中,只需移动它们
  • 为身份验证源编写自定义类,遵循 Joomla15 的示例和 本教程
    • org.coretechs.quotero.user.impl.AuthenticationSourceFoo(主类;它还处理域创建中要求的参数)
    • org.coretechs.quotero.user.impl.factory.foo.FooUserFactory(与用户表交互)
    • org.coretechs.quotero.user.impl.factory.foo.FooGroupFactory(与组表交互)
    • org.coretechs.quotero.user.impl.factory.foo.FooDBManagerDB2(与数据库交互)
    • org.coretechs.quotero.user.impl.factory.foo.FooPasswordHash(实现自定义密码哈希算法)
  • 在 Eclipse(或类似的 IDE)项目中插入此类,使用您可以在 QuoteroServer/WEB-INF/lib 和 QuoteroClient/WEB-INF/lib 中找到的所有库设置构建路径,
  • 生成 .jar 并将其放置在 QuoteroServer/WEB 中-INF/lib
  • 将 .jar 与数据库驱动程序放在同一文件夹中,
  • 浏览到 http://localhost:8080/QuoteroClient、登录(默认用户名是admin,密码admin)
  • 打开工具箱>管理>域并添加一个新域,选择作为域键入您的自定义身份验证源并设置参数,例如数据库 URL、用户名和密码

这样您就可以使用属于主 Web 应用程序(或其他任何内容)的用户和组的帐户登录数据库中包含用户和组表的应用程序!)以及 Quotero DMS 的文件和文件夹的权限可以参考这些。其他数据,例如属于经典域的权限、文档、任务、工作流程、用户和组,将保留在 Quotero DB 中。 因此,您有 2 个数据库:一个用于整个 Quotero DMS,另一个(已经存在)用于 Quotero 检索用户和组(无需复制这些数据)。

编辑:

I不得不面对一些损害 Quotero 工作的错误...所以我不得不放弃这个解决方案

I found these possible solutions:

  • LetoDMS (ex MyDMS), written in PHP, has it's own users and groups tables, old-fashioned style, less user-friendly
  • Quotero, written in Java, with LDAP, Active Directory, Joomla authentication support; more custom authentication sources can be built (starting from this tutorial); it's project seems more active; it has the most user-friendly and modern layout

Even if it has some bugs, I've choosen Quotero, for the above reasons. It's extensibility (relative to what I need) surprised me.

How I installed (in Tomcat 6 on Ubuntu Server 10 and Tomcat 7 on Windows 7) and integrated it with my main webapp:

  • install MySQL, PostgreSQL, Oracle DB, SQL Server or another DBMS (the last requires customization)
  • download quotero-deployer-2.0.war
  • place quotero-deployer-2.0.war in Tomcat webapps
  • browse to http://localhost:8080/quotero-deployer-2.0 and use the wizard to configure your installation (see quick install tutorial)
  • the wizard will create the DB and 2 .war in webapps folder: QuoteroServer and QuoteroClient; users will use the latter
    • in Linux systems it will probably place these webapps in /usr/share/tomcatx/webapps folder; if you need them in /var/lib/tomcatx/webapps, just move them
  • write your custom classes for the authentication source, following Joomla15's example and this tutorial
    • org.coretechs.quotero.user.impl.AuthenticationSourceFoo (the main class; it handles also the parameters asked in domain creation)
    • org.coretechs.quotero.user.impl.factory.foo.FooUserFactory (interacts with users table)
    • org.coretechs.quotero.user.impl.factory.foo.FooGroupFactory (interacts with groups table)
    • org.coretechs.quotero.user.impl.factory.foo.FooDBManagerDB2 (interacts with the DB)
    • org.coretechs.quotero.user.impl.factory.foo.FooPasswordHash (implements custom password hash algorithm)
  • insert such classes inside an Eclipse (or similar IDE) project, setting the build path with all libraries you can find in QuoteroServer/WEB-INF/lib and QuoteroClient/WEB-INF/lib
  • generate a .jar and place it in QuoteroServer/WEB-INF/lib
  • place the .jar with your DB driver in the same folder
  • browse to http://localhost:8080/QuoteroClient, log in (default username is admin and password admin)
  • open Toolbox > Administration > Domains and add a new domain, choosing as Domain Type your custom authentication source and setting the parameters, such as DB URL, username and password

In this way you can log in with the accounts belonging to users and groups of your main webapp (or whatever application with users and groups tables in a DB!) and also permissions on files and folders of Quotero DMS can be referred to those ones. Other data, such as permissions, documents, tasks, workflows, user and groups belonging to classical domain, will remain in the Quotero DB. So you have 2 DB: one for the whole Quotero DMS and one (already existing) where Quotero retreives users and groups (no need to replicate these data).

EDIT:

I had to face some bugs that compromise the working of Quotero... so I had to abandon this solution.

池木 2024-10-23 08:05:03

我最终决定使用商业客户端-服务器 DMS 并在其之上构建一个 Web 应用程序来检索文档及其关系。文档访问控制由 DMS 管理,并提供用户名和密码。用户和组可以轻松添加到 DMS。这是基础设施:

                      SOAP                   WCF connector (DLL)
webapp (JSP, mapping) ----> web service (C#) ------------------> WCF (DMS server)

I finally decided to use a commercial client-server DMS and built on top of it a webapp for retrieving documents and their relationships. Documents access control is managed by the DMS, given username and password. Users and groups can be easily added to the DMS. This is the infrastructure:

                      SOAP                   WCF connector (DLL)
webapp (JSP, mapping) ----> web service (C#) ------------------> WCF (DMS server)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文