From 3751379f1e9a4c215fb6eb898b4ccc67659b9ace Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Tue, 10 May 2022 21:51:50 +0700 Subject: initial commit 2 --- .../security/website_forum_security.xml | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 addons/website_forum/security/website_forum_security.xml (limited to 'addons/website_forum/security/website_forum_security.xml') diff --git a/addons/website_forum/security/website_forum_security.xml b/addons/website_forum/security/website_forum_security.xml new file mode 100644 index 00000000..1293ae07 --- /dev/null +++ b/addons/website_forum/security/website_forum_security.xml @@ -0,0 +1,74 @@ + + + + Website forum: Public user can only access to public forum + + [('privacy', '=', 'public')] + + + + Website forum: User can only access to public (or authorized) forum + + [ + '|', + ('privacy', 'in', ['public', 'connected']), + '&', + ('privacy', '=', 'private'), + ('authorized_group_id', 'in', user.groups_id.ids)] + + + + Website forum: Website designer can create private forum + + [(1, '=', 1)] + + + + + + + + Website forum: All access for manager + + [(1, '=', 1)] + + + + + Website forum post: Public user can only access to public post + + [('forum_id.privacy', '=', 'public')] + + + + Website forum post: User can only access to public (or authorized) post + + ['|', ('forum_id.privacy', 'in', ['public', 'connected']), '&', ('forum_id.privacy', '=', 'private'), ('forum_id.authorized_group_id', 'in', user.groups_id.ids)] + + + + Website forum post : All access for manager + + [(1, '=', 1)] + + + + + Website forum tag: Public user can only access to tag linked to public forum + + [('forum_id.privacy', '=', 'public')] + + + + Website forum tag: User can only access to tag linked to public (or authorized) forum + + ['|', ('forum_id.privacy', 'in', ['public', 'connected']), '&', ('forum_id.privacy', '=', 'private'), ('forum_id.authorized_group_id', 'in', user.groups_id.ids)] + + + + Website forum tag : Manager user can access to all tags + + [(1, '=', 1)] + + + -- cgit v1.2.3