app/soc/views/models/host.py
changeset 920 39badbfb80be
parent 913 db38e7680d1c
child 944 5ea2bd9e3fa6
equal deleted inserted replaced
919:3f9072bab1d4 920:39badbfb80be
    76   """Django form displayed when editing a Host.
    76   """Django form displayed when editing a Host.
    77   """
    77   """
    78 
    78 
    79   pass
    79   pass
    80 
    80 
       
    81 # TODO(ljvderijk) rewrite the Host View module to comply with the new request system
       
    82 # so that non-developers can create Hosts
       
    83 
    81 class View(role.View):
    84 class View(role.View):
    82   """View methods for the Host model.
    85   """View methods for the Host model.
    83   """
    86   """
    84 
    87 
    85   def __init__(self, params=None):
    88   def __init__(self, params=None):
    89     Params:
    92     Params:
    90       params: a dict with params for this View
    93       params: a dict with params for this View
    91     """
    94     """
    92 
    95 
    93     rights = {}
    96     rights = {}
    94     rights['create'] = [access.checkIsHost]
    97     rights['create'] = [access.checkIsDeveloper]
    95     rights['edit'] = [access.checkIsHost]
    98     # TODO(ljvderijk) write the edit check
       
    99     #rights['edit'] = [access.checkIsMyHost]
    96     rights['list'] = [access.checkIsHost]
   100     rights['list'] = [access.checkIsHost]
    97 
   101 
    98     new_params = {}
   102     new_params = {}
    99     new_params['rights'] = rights
   103     new_params['rights'] = rights
   100     new_params['logic'] = soc.logic.models.host.logic
   104     new_params['logic'] = soc.logic.models.host.logic