練功房推薦書單

  • 猛虎出柙雙劍合璧版--最新 OCA / OCP Java SE 7 Programmer 專業認證 (電子書)
  • 流浪教師存零股存到3000萬(全新增修版)(書+DVD)
  • 開始在關西自助旅行(京都‧大阪‧神戶‧奈良)(全新增訂版)
  • 不敗教主的300張股票存股術

JForum permissions manual RSS feed
討論區首頁 » JForum中文社群 JForum Chinese Users Community
發表人 內容
acer123

九級學員

註冊時間: 2009/9/10
文章: 19
離線
餵。對不起,我的中文不好,我用谷歌翻譯將文本轉換從英語譯成漢語。我已經實現JForums為我們的網站,但它看起來像原來jforums社會有點兒死亡。

我真正想做的是手動授予權限的組而不是通過管理控制面板。我創建了200個團體在jforum_groups表。請您告訴我的表,我需要手動插入的權限的組?。美國廣播公司等集團不是管理員,也只能看到某某類,具有只讀權限的瑞士EFG論壇等

希望你有我的觀點。感謝您的支持
andowson

七段學員
[Avatar]

註冊時間: 2007/1/2
文章: 711
來自: 台北
離線
Dear acer123,
It's OK for you to ask question in English. The translated Chinese by Google translation is not very clear for me to understand. So, can you repeat your question again?

Andowson

分享經驗 累積智慧
[WWW]
acer123

九級學員

註冊時間: 2009/9/10
文章: 19
離線
Thank you for your reply. i have close to 50 groups created under jforum_groups table with user id assigned to those groups manually in jforums_user_groups table. Now instead of giving setting each of those groups permissions through Admin control panel i would like to give them permissions through the table meaning by inserting queries manually for assigning categories to those groups, is administrator, read only forums etc.I need to know some insight on the tables or may be a data dictionary would be great. Thanks.
andowson

七段學員
[Avatar]

註冊時間: 2007/1/2
文章: 711
來自: 台北
離線
You can refer to the data_dump.sql script inside the WEB-INF/config/database directory.
Take postgresql as an example:
Replace the ? mark with the group_id you created and remove some unnecessary permission from the SQL script.

-- Admin
INSERT INTO jforum_roles (group_id, name) VALUES (?, 'perm_administration');
INSERT INTO jforum_roles (group_id, name) VALUES (?, 'perm_moderation');
INSERT INTO jforum_roles (group_id, name) VALUES (?, 'perm_moderation_post_remove');
INSERT INTO jforum_roles (group_id, name) VALUES (?, 'perm_moderation_post_edit');
INSERT INTO jforum_roles (group_id, name) VALUES (?, 'perm_moderation_topic_move');
INSERT INTO jforum_roles (group_id, name) VALUES (?, 'perm_moderation_topic_lockUnlock');
INSERT INTO jforum_roles (group_id, name) VALUES (?, 'perm_moderation_approve_messages');
INSERT INTO jforum_roles (group_id, name) VALUES (?, 'perm_create_sticky_announcement_topics');
INSERT INTO jforum_roles (group_id, name) VALUES (?, 'perm_vote');
INSERT INTO jforum_roles (group_id, name) VALUES (?, 'perm_create_poll');
INSERT INTO jforum_roles (group_id, name) VALUES (?, 'perm_karma_enabled');
INSERT INTO jforum_roles (group_id, name) VALUES (?, 'perm_bookmarks_enabled');
INSERT INTO jforum_roles (group_id, name) VALUES (?, 'perm_attachments_download');
INSERT INTO jforum_roles (group_id, name) VALUES (?, 'perm_moderation_log'); -- novo
INSERT INTO jforum_roles (group_id, name) VALUES (?, 'perm_full_moderation_log'); -- novo

--
-- View Forum
--
INSERT INTO jforum_roles (name, group_id) VALUES ('perm_forum', ?);
INSERT INTO jforum_role_values (role_id, role_value) VALUES ((SELECT CURRVAL('jforum_roles_seq')), '1');

--
-- Anonymous posts
--
INSERT INTO jforum_roles (name, group_id) VALUES ('perm_anonymous_post', ?);
INSERT INTO jforum_role_values (role_id, role_value) VALUES ((SELECT CURRVAL('jforum_roles_seq')), '1');

--
-- View Category
--
INSERT INTO jforum_roles (name, group_id) VALUES ('perm_category', ?);
INSERT INTO jforum_role_values (role_id, role_value) VALUES ((SELECT CURRVAL('jforum_roles_seq')), '1');

--
-- Create / Reply to topics
--
INSERT INTO jforum_roles (name, group_id) VALUES ('perm_read_only_forums', ?);
INSERT INTO jforum_role_values (role_id, role_value) VALUES ((SELECT CURRVAL('jforum_roles_seq')), '1');

--
-- Enable HTML
--
INSERT INTO jforum_roles (name, group_id) VALUES ('perm_html_disabled', ?);
INSERT INTO jforum_role_values (role_id, role_value) VALUES ((SELECT CURRVAL('jforum_roles_seq')), '1');

--
-- Attachments
--
INSERT INTO jforum_roles (name, group_id) VALUES ('perm_attachments_enabled', ?);
INSERT INTO jforum_role_values (role_id, role_value) VALUES ((SELECT CURRVAL('jforum_roles_seq')), '1');

--
-- Reply only
--
INSERT INTO jforum_roles (name, group_id) VALUES ('perm_reply_only', ?);
INSERT INTO jforum_role_values ( role_id, role_value) VALUES ((SELECT CURRVAL('jforum_roles_seq')), '1');

--
-- Reply without moderation
--
INSERT INTO jforum_roles (name, group_id) VALUES ('perm_reply_without_moderation', ?); -- novo
INSERT INTO jforum_role_values ( role_id, role_value) VALUES ((SELECT CURRVAL('jforum_roles_seq')), '1');

--
-- Moderation of forums
--
INSERT INTO jforum_roles (name, group_id) VALUES ('perm_moderation_forums', ?);
INSERT INTO jforum_role_values ( role_id, role_value) VALUES ((SELECT CURRVAL('jforum_roles_seq')), '1');


And see http://code.google.com/p/jforum2/wiki/Permissions for the detail descripton of each permission

After manually insertion to the database, you need to reload the JForum application to take effect.

分享經驗 累積智慧
[WWW]
acer123

九級學員

註冊時間: 2009/9/10
文章: 19
離線
Thank you so much for your prompt reply. This is very helpful.
acer123

九級學員

註冊時間: 2009/9/10
文章: 19
離線
Just wanted to let you know mate that in the SSO example you posted it works fine however if a person close the browser and go to the list.page in the forums directly by pasting the link in the browser he can still enter the site because he is an anonymous user. You might wanna send a redirect to xyz.page where it creates the anonymous user in the SSO method.

Just wanted to share with you guys. Hope it helps other people.
 
討論區首頁 » JForum中文社群 JForum Chinese Users Community
前往:   
行動版