app/soc/views/models/club_member.py
author Lennard de Rijk <ljvderijk@gmail.com>
Tue, 30 Jun 2009 14:55:55 +0200
changeset 2463 05af53239799
parent 2177 e2c193e1f631
child 2667 260aaea36e49
permissions -rw-r--r--
Add more flexibility to the Survey helper for use with the new Survey types. This includes using the new SurveyLogic methods from an earlier commit. And passing on the Logic from the view where necessary.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
980
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     1
#!/usr/bin/python2.5
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     2
#
1307
091a21cf3627 Update the copyright notice for 2009.
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1248
diff changeset
     3
# Copyright 2009 the Melange authors.
980
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     4
#
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     5
# Licensed under the Apache License, Version 2.0 (the "License");
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     6
# you may not use this file except in compliance with the License.
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     7
# You may obtain a copy of the License at
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     8
#
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     9
#   http://www.apache.org/licenses/LICENSE-2.0
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    10
#
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    11
# Unless required by applicable law or agreed to in writing, software
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    12
# distributed under the License is distributed on an "AS IS" BASIS,
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    13
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    14
# See the License for the specific language governing permissions and
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    15
# limitations under the License.
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    16
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    17
"""Views for Club Members.
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    18
"""
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    19
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    20
__authors__ = [
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    21
    '"Lennard de Rijk" <ljvderijk@gmail.com>'
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    22
  ]
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    23
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    24
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    25
from django import forms
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    26
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    27
from soc.logic import dicts
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    28
from soc.logic.models import club as club_logic
2019
90285a09e26e Fixed access check in club_member view.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2018
diff changeset
    29
from soc.logic.models import club_member as club_member_logic
1163
d8c50be19232 Cleaned up access.py
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1116
diff changeset
    30
from soc.logic.models import club_admin as club_admin_logic
980
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    31
from soc.views.helper import access
1583
1e4c785f1adf Added decorators
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1430
diff changeset
    32
from soc.views.helper import decorators
980
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    33
from soc.views.helper import dynaform
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    34
from soc.views.helper import widgets
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    35
from soc.views.models import club as club_view
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    36
from soc.views.models import role
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    37
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    38
import soc.logic.models.club_member
1067
ecf3df87b81c Added manage view for Club Admins, Club Members and Hosts.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 1030
diff changeset
    39
import soc.logic.models.club_admin
980
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    40
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    41
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    42
class View(role.View):
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    43
  """View methods for the Club Member model.
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    44
  """
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    45
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    46
  def __init__(self, params=None):
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    47
    """Defines the fields and methods required for the base View class
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    48
    to provide the user with list, public, create, edit and delete views.
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    49
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    50
    Params:
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    51
      params: a dict with params for this View
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    52
    """
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    53
1007
3b66772d21a5 Major refactor of the access module
Sverre Rabbelier <srabbelier@gmail.com>
parents: 998
diff changeset
    54
    rights = access.Checker(params)
3b66772d21a5 Major refactor of the access module
Sverre Rabbelier <srabbelier@gmail.com>
parents: 998
diff changeset
    55
    rights['create'] = ['checkIsDeveloper']
2019
90285a09e26e Fixed access check in club_member view.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2018
diff changeset
    56
    rights['edit'] = [('checkHasActiveRoleForScope', club_member_logic.logic),
2020
df3552deba66 Clarified docstring in access.py and changed edit access checks for role views.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2019
diff changeset
    57
        ('checkIsMyEntity', [club_member_logic.logic, 'user', True])]
1007
3b66772d21a5 Major refactor of the access module
Sverre Rabbelier <srabbelier@gmail.com>
parents: 998
diff changeset
    58
    rights['delete'] = ['checkIsDeveloper']
1248
f318538394d9 Rename checkHasActiveRole to checkHasActiveRoleForScope
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1203
diff changeset
    59
    rights['invite'] = [('checkHasActiveRoleForScope', club_admin_logic.logic)]
1007
3b66772d21a5 Major refactor of the access module
Sverre Rabbelier <srabbelier@gmail.com>
parents: 998
diff changeset
    60
    rights['accept_invite'] = [('checkCanCreateFromRequest','club_member')]
1012
73f0b61f2d9d Fold checkAgreesToSiteToS into checkIsUser
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1007
diff changeset
    61
    rights['request'] = ['checkIsUser',
1163
d8c50be19232 Cleaned up access.py
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1116
diff changeset
    62
                         ('checkCanMakeRequestToGroup', club_logic)]
1662
1ccf04cbca15 Fix too long lines soc.views.models.club_admin, club_app and club_member modules.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents: 1584
diff changeset
    63
    rights['process_request'] = [('checkHasActiveRoleForScope', 
1ccf04cbca15 Fix too long lines soc.views.models.club_admin, club_app and club_member modules.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents: 1584
diff changeset
    64
                                  club_admin_logic.logic),
1ccf04cbca15 Fix too long lines soc.views.models.club_admin, club_app and club_member modules.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents: 1584
diff changeset
    65
                                  ('checkCanProcessRequest','club_member')]
1163
d8c50be19232 Cleaned up access.py
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1116
diff changeset
    66
    rights['manage'] = [('checkIsAllowedToManageRole',
1184
bd9c6101d41d Use .logic in checkIsAllowedToManageRole at the caller
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1163
diff changeset
    67
                         [soc.logic.models.club_member.logic,
bd9c6101d41d Use .logic in checkIsAllowedToManageRole at the caller
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1163
diff changeset
    68
                          club_admin_logic.logic])]
980
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    69
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    70
    new_params = {}
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    71
    new_params['logic'] = soc.logic.models.club_member.logic
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    72
    new_params['group_logic'] = club_logic.logic
990
fd1e6afb2d62 Added two needed redirects in role.py.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 980
diff changeset
    73
    new_params['group_view'] = club_view.view
980
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    74
    new_params['rights'] = rights
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    75
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    76
    new_params['scope_view'] = club_view
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    77
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    78
    new_params['name'] = "Club Member"
1025
1f83f05f522b Add grouping to the existing views
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1012
diff changeset
    79
    new_params['sidebar_grouping'] = 'Clubs'
980
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    80
1076
063194eaf87b Added agreed_to_tos_on field in user and role model.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 1067
diff changeset
    81
    new_params['extra_dynaexclude'] = ['agreed_to_tos']
980
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    82
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    83
    new_params['allow_requests_and_invites'] = True
1384
bb22ea156567 Role overview membership is now determined by setting show_in_roles_overview param to true in the view.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 1343
diff changeset
    84
    new_params['show_in_roles_overview'] = False
980
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    85
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    86
    params = dicts.merge(params, new_params)
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    87
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    88
    super(View, self).__init__(params=params)
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    89
998
125257161908 Implemented the listing of all the roles in for a specific group.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 990
diff changeset
    90
    # register the role with the group_view
2177
e2c193e1f631 Do not rely on dicts.merge to change target
Sverre Rabbelier <srabbelier@gmail.com>
parents: 2076
diff changeset
    91
    self._params['group_view'].registerRole(self._params['module_name'], self)
998
125257161908 Implemented the listing of all the roles in for a specific group.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 990
diff changeset
    92
980
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    93
    # create and store the special form for invited users
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    94
    updated_fields = {
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    95
        'link_id': forms.CharField(widget=widgets.ReadOnlyInput(),
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    96
            required=False)}
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    97
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    98
    invited_create_form = dynaform.extendDynaForm(
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    99
        dynaform = self._params['create_form'],
1430
ff8cc6b15e6a Rename dynafields to dynaproperties
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1384
diff changeset
   100
        dynaproperties = updated_fields)
980
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   101
2177
e2c193e1f631 Do not rely on dicts.merge to change target
Sverre Rabbelier <srabbelier@gmail.com>
parents: 2076
diff changeset
   102
    self._params['invited_create_form'] = invited_create_form
980
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   103
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   104
  def _editPost(self, request, entity, fields):
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   105
    """See base.View._editPost().
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   106
    """
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   107
    
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   108
    if not entity:
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   109
      fields['user'] = fields['link_id']
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   110
      fields['link_id'] = fields['user'].link_id
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   111
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   112
    super(View, self)._editPost(request, entity, fields)
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   113
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   114
  def _acceptInvitePost(self, fields, request, context, params, **kwargs):
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   115
    """Fills in the fields that were missing in the invited_created_form.
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   116
    
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   117
    For params see base.View._acceptInvitePost()
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   118
    """
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   119
    # fill in the appropriate fields that were missing in the form
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   120
    fields['user'] = fields['link_id']
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   121
    fields['link_id'] = fields['user'].link_id
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   122
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   123
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   124
view = View()
3f3f7ec251bf Added Club Members to SoC.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
   125
1584
d8ba8c917f37 Make use of decorators.view for all views
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1583
diff changeset
   126
accept_invite = decorators.view(view.acceptInvite)
d8ba8c917f37 Make use of decorators.view for all views
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1583
diff changeset
   127
admin = decorators.view(view.admin)
d8ba8c917f37 Make use of decorators.view for all views
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1583
diff changeset
   128
create = decorators.view(view.create)
d8ba8c917f37 Make use of decorators.view for all views
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1583
diff changeset
   129
delete = decorators.view(view.delete)
d8ba8c917f37 Make use of decorators.view for all views
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1583
diff changeset
   130
edit = decorators.view(view.edit)
d8ba8c917f37 Make use of decorators.view for all views
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1583
diff changeset
   131
invite = decorators.view(view.invite)
d8ba8c917f37 Make use of decorators.view for all views
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1583
diff changeset
   132
list = decorators.view(view.list)
d8ba8c917f37 Make use of decorators.view for all views
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1583
diff changeset
   133
manage = decorators.view(view.manage)
d8ba8c917f37 Make use of decorators.view for all views
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1583
diff changeset
   134
process_request = decorators.view(view.processRequest)
2076
1cd180cc56c9 Style fixes and removal of unused imports in soc.views.models.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents: 2020
diff changeset
   135
role_request = decorators.view(view.request)
1584
d8ba8c917f37 Make use of decorators.view for all views
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1583
diff changeset
   136
public = decorators.view(view.public)
d8ba8c917f37 Make use of decorators.view for all views
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1583
diff changeset
   137
export = decorators.view(view.export)