Skip to content

Commit

Permalink
IMPL adds mail_channel to access rights
Browse files Browse the repository at this point in the history
  • Loading branch information
FranzPoize committed Sep 8, 2023
1 parent 2d15293 commit ffa2445
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions base_group_backend/models/res_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ def has_group(self, group_ext_id):
) or super().has_group("base_group_backend.group_backend_ui_users")
if has_base_group_backend:
_logger.warning(
"Forcing has_group to return True for group_backend and base_group_backend_ui_users"
"Forcing has_group to return True"
+ " for group_backend and base_group_backend_ui_users"
)
return has_base_group_backend
return res

@api.depends("groups_id")
def _compute_share(self):
super()._compute_share()
res = super()._compute_share()
backend_user_group_id = self.env["ir.model.data"]._xmlid_to_res_id(
"base_group_backend.base_group_backend"
)
Expand All @@ -46,3 +47,4 @@ def _compute_share(self):
[("groups_id", "in", [backend_user_group_id, backend_ui_user_group_id])]
)
internal_users.share = False
return res
1 change: 1 addition & 0 deletions base_group_backend/security/ir.model.access.csv
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ backend_ui_users_ir_attachment,backend_ui_users_ir_attachment,base.model_ir_atta
backend_ui_users_res_partner,backend_ui_users_res_partner,base.model_res_partner,group_backend_ui_users,1,0,0,0
backend_ui_users_bus_presence,backend_ui_users_bus_presence,bus.model_bus_presence,group_backend_ui_users,1,1,1,1
backend_ui_users_mail_channel_member_public,backend_ui_users_mail_channel_member,mail.model_mail_channel_member,group_backend_ui_users,1,1,1,0
backend_ui_users_mail_channel_public,backend_ui_users_mail_channel_member,mail.model_mail_channel,group_backend_ui_users,1,1,1,0
backend_ui_users_mail_activity,backend_ui_users_mail_activity,mail.model_mail_activity,group_backend_ui_users,1,1,1,1
backend_ui_users_mail_activity_type,backend_ui_users_mail_activity_type,mail.model_mail_activity_type,group_backend_ui_users,1,0,0,0
backend_ui_users_mail_followers,backend_ui_users_mail_followers,mail.model_mail_followers,group_backend_ui_users,1,0,0,0
Expand Down

0 comments on commit ffa2445

Please sign in to comment.