48 params: a dict with params for this View |
48 params: a dict with params for this View |
49 """ |
49 """ |
50 |
50 |
51 rights = access.Checker(params) |
51 rights = access.Checker(params) |
52 rights['create'] = ['checkIsDeveloper'] |
52 rights['create'] = ['checkIsDeveloper'] |
53 rights['edit'] = [('checkHasActiveRole', [host_logic, 'link_id']), |
53 rights['edit'] = [('checkHasActiveRoleForScope', [host_logic, 'link_id']), |
54 ('checkIsActive', [sponsor_logic, None, 'link_id'])] |
54 ('checkIsActive', [sponsor_logic, None, 'link_id'])] |
55 rights['delete'] = ['checkIsDeveloper'] |
55 rights['delete'] = ['checkIsDeveloper'] |
56 rights['home'] = [('checkHasActiveRole', host_logic)] |
56 rights['home'] = [('checkHasActiveRoleForScope', host_logic)] |
57 rights['list'] = ['checkIsDeveloper'] |
57 rights['list'] = ['checkIsDeveloper'] |
58 rights['list_requests'] = [('checkHasActiveRole', [host_logic, 'link_id'])] |
58 rights['list_requests'] = [('checkHasActiveRoleForScope', [host_logic, 'link_id'])] |
59 rights['list_roles'] = [('checkHasActiveRole', [host_logic, 'link_id'])] |
59 rights['list_roles'] = [('checkHasActiveRoleForScope', [host_logic, 'link_id'])] |
60 |
60 |
61 new_params = {} |
61 new_params = {} |
62 new_params['logic'] = soc.logic.models.sponsor.logic |
62 new_params['logic'] = soc.logic.models.sponsor.logic |
63 new_params['rights'] = rights |
63 new_params['rights'] = rights |
64 |
64 |