Skip to content

Commit

Permalink
[IMP] mail: change access for create message for the attachments
Browse files Browse the repository at this point in the history
bzr revid: chm@openerp.com-20121130110902-1qzmgvinhc0q0i3j
  • Loading branch information
Gorash committed Nov 30, 2012
1 parent 48c6ea7 commit 61065b6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions addons/mail/mail_message.py
Expand Up @@ -631,8 +631,8 @@ def check_access_rule(self, cr, uid, ids, operation, context=None):
model_obj = self.pool.get(model)
mids = model_obj.exists(cr, uid, mids)
if operation in ['create', 'write', 'unlink']:
model_obj.check_access_rights(cr, uid, 'write')
model_obj.check_access_rule(cr, uid, mids, 'write', context=context)
model_obj.check_access_rights(cr, uid, 'read')
model_obj.check_access_rule(cr, uid, mids, 'read', context=context)
else:
model_obj.check_access_rights(cr, uid, operation)
model_obj.check_access_rule(cr, uid, mids, operation, context=context)
Expand Down
3 changes: 1 addition & 2 deletions addons/mail/static/src/js/mail.js
Expand Up @@ -569,7 +569,6 @@ openerp.mail = function (session) {
var body = comment_node.val();

if (this.do_check_attachment_upload() && (this.attachment_ids.length || body.match(/\S+/))) {
comment_node.val('');
//session.web.blockUI();
this.parent_thread.ds_thread.call('message_post_user_api', [
this.context.default_res_id,
Expand All @@ -589,8 +588,8 @@ openerp.mail = function (session) {
var message = thread.create_message_object( data[0] );
// insert the message on dom
thread.insert_message( message, root ? undefined : self.$el, root );
self.on_cancel();
});
self.on_cancel();
//session.web.unblockUI();
});
return true;
Expand Down
1 change: 1 addition & 0 deletions addons/portal/security/ir.model.access.csv
Expand Up @@ -7,3 +7,4 @@ access_res_partner_category,res.partner_category,base.model_res_partner_category
access_res_partner_title,res.partner_title,base.model_res_partner_title,portal.group_portal,1,0,0,0
access_acquirer,portal.payment.acquirer,portal.model_portal_payment_acquirer,,1,0,0,0
access_acquirer_all,portal.payment.acquirer,portal.model_portal_payment_acquirer,base.group_system,1,1,1,1
access_ir_attachment_group_portal,ir.attachment group_portal,base.model_ir_attachment,portal.group_portal,1,0,1,0

0 comments on commit 61065b6

Please sign in to comment.