Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Create Blog Post: Access Denied

By
Ermin Trevisan
on 4/27/15, 1:39 AM 695 views

I can only create blog posts as admin, for all other users it results in access denied when I try it in the backend or an 500 server error, when I try it in the website frontend. 

Any hints?

This is the log:

 -

2015-04-27 05:33:02,868 1098 INFO twanda werkzeug: 127.0.0.1 - - [27/Apr/2015 05:33:02] "POST /web/dataset/call_kw/blog.blog/name_search HTTP/1.1" 200 -

2015-04-27 05:33:05,030 1098 WARNING twanda openerp.models: Access Denied by record rules for operation: read on record ids: [58], uid: 5, model: blog.post

2015-04-27 05:33:05,032 1098 WARNING twanda openerp.models: Access Denied by record rules for operation: create on record ids: [58], uid: 5, model: blog.post

2015-04-27 05:33:05,032 1098 ERROR twanda openerp.http: Exception during JSON request handling.

Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 530, in _handle_exception

    return super(JsonRequest, self)._handle_exception(exception)

  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 567, in dispatch

    result = self._call_function(**self.params)

  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 303, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 113, in wrapper

    return f(dbname, *args, **kwargs)

  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 300, in checked_call

    return self.endpoint(*a, **kw)

  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 796, in __call__

    return self.method(*args, **kw)

  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 396, in response_wrap

    response = f(*args, **kw)

  File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 949, in call_kw

    return self._call_kw(model, method, args, kwargs)

  File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 941, in _call_kw

    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)

  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper

    return old_api(self, *args, **kwargs)

  File "/usr/lib/python2.7/dist-packages/openerp/addons/website_blog/models/website_blog.py", line 240, in create

    post_id = super(BlogPost, self).create(cr, uid, vals, context=create_context)

  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper

    return old_api(self, *args, **kwargs)

  File "/usr/lib/python2.7/dist-packages/openerp/addons/mail/mail_thread.py", line 377, in create

    thread_id = super(mail_thread, self).create(cr, uid, values, context=context)

  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper

    return old_api(self, *args, **kwargs)

  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 336, in old_api

    result = method(recs, *args, **kwargs)

  File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4062, in create

    record = self.browse(self._create(old_vals))

  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 239, in wrapper

    return new_api(self, *args, **kwargs)

  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 462, in new_api

    result = method(self._model, cr, uid, *args, **kwargs)

  File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4275, in _create

    self.check_access_rule(cr, user, [id_new], 'create', context=context)

  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper

    return old_api(self, *args, **kwargs)

  File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 3515, in check_access_rule

    self._check_record_rules_result_count(cr, uid, sub_ids, returned_ids, operation, context=context)

  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper

    return old_api(self, *args, **kwargs)

  File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 3464, in _check_record_rules_result_count

    (self._description, operation))

except_orm: (u'Zugriff verweigert', u'Der gew\xfcnschte Vorgang kann aufgrund von Sicherheitsbeschr\xe4nkungen nicht ausgef\xfchrt werden. Bitte kontaktieren Sie den Systemadministrator.\n\n(Dokumenten Typ: Blog Post, Vorgang: create)')


If it helps to get an answer: I have installed the module website_blog_mgmt and then website_blog_private by Opensur. I have uninstalled both modules again, but still have the error.

Ermin Trevisan
on 4/27/15, 10:15 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/27/15, 1:39 AM
Seen: 695 times
Last updated: 2/11/16, 12:07 PM