summaryrefslogtreecommitdiff
path: root/addons/website_slides/security
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2019-01-28 16:45:27 +0000
committerThibault Delavallée <tde@odoo.com>2019-01-29 09:24:48 +0000
commitc273e89d5508a191a0e0f4d011e3283d9fe21615 (patch)
tree8c3c6d360287985c41c21d4b9e07effac07a0d4e /addons/website_slides/security
parentbf4427f68256e3a5c92e2c007886a2d31fda0a18 (diff)
[REF] website_slides: introduce slide / user relationship and use it for vote
Purpose of this commit is to store a relationship between slides and users. Indeed starting from now we will track more user interaction with the slides module. In this commit we introduce a model that is used to populate and decorate the relationship between slides and users, slide.users. From slides or users point of view it behaves like a many2many. It can also be used to store more information about the user interaction with the slide. We use it here to store the user vote. Like and dislike are not static counters anymore but computed fields based on user votes. It is implemented as a tristate field. As it is a technical model no access on slide.users is granted. Controllers and methods grant access to the relationship in order to avoid information lead and keep technical details private. Future commits improving the eLearning use of slides will notably store information about user having read the slide, taken a quizz or gaining karma depending on some actions performed on the slide. This commit is linked to task ID 1934488 and PR #30620 .
Diffstat (limited to 'addons/website_slides/security')
-rw-r--r--addons/website_slides/security/ir.model.access.csv2
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/website_slides/security/ir.model.access.csv b/addons/website_slides/security/ir.model.access.csv
index 07d087f7db9..38588d920d1 100644
--- a/addons/website_slides/security/ir.model.access.csv
+++ b/addons/website_slides/security/ir.model.access.csv
@@ -2,6 +2,8 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_slide_slide_public,slide.slide.public,model_slide_slide,base.group_public,1,0,0,0
access_slide_slide_portal,slide.slide.portal,model_slide_slide,base.group_portal,1,0,0,0
access_slide_slide_user,slide.slide.user,model_slide_slide,base.group_user,1,1,1,1
+access_slide_users_all,slide.users.all,model_slide_users,,0,0,0,0
+access_slide_users_system,slide.users.system,model_slide_users,base.group_system,1,1,1,1
access_slide_tag_public,slide.tag.public,model_slide_tag,base.group_public,1,0,0,0
access_slide_tag_portal,slide.tag.portal,model_slide_tag,base.group_portal,1,0,0,0
access_slide_tag_user,slide.tag.user,model_slide_tag,base.group_user,1,1,1,1