trivial: remove dead "common" backoffice code (#49268)
This commit is contained in:
parent
47f956dd37
commit
4a3d2d6867
|
@ -15,10 +15,6 @@
|
|||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from quixote.directory import Directory, AccessControlled
|
||||
from quixote import get_publisher, get_request, get_response
|
||||
|
||||
from .. import _
|
||||
from .. import errors
|
||||
|
||||
|
||||
class BackofficeRootDirectory(AccessControlled, Directory):
|
||||
|
@ -36,19 +32,3 @@ class BackofficeRootDirectory(AccessControlled, Directory):
|
|||
# used to remove an item
|
||||
return
|
||||
cls.menu_items.append((url, title, options))
|
||||
|
||||
def _q_access(self):
|
||||
get_response().breadcrumb.append( ('backoffice/', _('Back Office')) )
|
||||
|
||||
user = get_request().user
|
||||
if not user and get_publisher().user_class.count() > 0:
|
||||
raise errors.AccessUnauthorizedError(
|
||||
public_msg = _('Access to backoffice is restricted to authorized persons only. '\
|
||||
'Please login.'))
|
||||
if user and not user.can_go_in_backoffice():
|
||||
raise errors.AccessForbiddenError()
|
||||
|
||||
get_response().filter['in_backoffice'] = True
|
||||
|
||||
def get_menu_items(self):
|
||||
return self.menu_items
|
||||
|
|
Loading…
Reference in New Issue